| 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;
|
| }
|
|
|
|
|