Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1624)

Unified Diff: tools/gn/target.cc

Issue 1842563006: DO NOT SUBMIT. Experimental Mac GN Framework support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Binary bundle data Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/substitution_type.cc ('k') | tools/gn/variables.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.cc
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index 2386870c5788f4813d635f24450d8e453eab26c4..ca4f7b14ae14fb2681cf15af3500eee7b437c7f1 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -351,16 +351,19 @@ std::string Target::GetComputedOutputName(bool include_prefix) const {
: output_name_;
std::string result;
+ FindDir(&name).AppendToString(&result);
+ base::StringPiece basename = FindFilename(&name);
if (include_prefix) {
const Tool* tool = toolchain_->GetToolForTargetFinalOutput(this);
if (tool) {
// Only add the prefix if the name doesn't already have it.
- if (!base::StartsWith(name, tool->output_prefix(),
- base::CompareCase::SENSITIVE))
- result = tool->output_prefix();
+ if (!base::StartsWith(basename, tool->output_prefix(),
+ base::CompareCase::SENSITIVE)) {
+ result.append(tool->output_prefix());
+ }
}
}
- result.append(name);
+ basename.AppendToString(&result);
return result;
}
« no previous file with comments | « tools/gn/substitution_type.cc ('k') | tools/gn/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698