| Index: tools/gn/ninja_binary_target_writer.cc
|
| diff --git a/tools/gn/ninja_binary_target_writer.cc b/tools/gn/ninja_binary_target_writer.cc
|
| index b1bf8032e1bccd902164d59eb6f6aab802e00f6a..eaae098ef71289ae22c2b12e4ec064e633fdb14c 100644
|
| --- a/tools/gn/ninja_binary_target_writer.cc
|
| +++ b/tools/gn/ninja_binary_target_writer.cc
|
| @@ -854,15 +854,9 @@ void NinjaBinaryTargetWriter::WriteLibs() {
|
| }
|
|
|
| void NinjaBinaryTargetWriter::WriteOutputExtension() {
|
| - out_ << " output_extension = ";
|
| - if (target_->output_extension().empty()) {
|
| - // Use the default from the tool.
|
| - out_ << tool_->default_output_extension();
|
| - } else {
|
| - // Use the one specified in the target. Note that the one in the target
|
| - // does not include the leading dot, so add that.
|
| - out_ << "." << target_->output_extension();
|
| - }
|
| + out_ << " output_extension = "
|
| + << SubstitutionWriter::GetLinkerSubstitution(
|
| + target_, tool_, SUBSTITUTION_OUTPUT_EXTENSION);
|
| out_ << std::endl;
|
| }
|
|
|
|
|