| Index: tools/gn/substitution_writer.cc
|
| diff --git a/tools/gn/substitution_writer.cc b/tools/gn/substitution_writer.cc
|
| index 99abced1e3cde83c44cb2b2bc26a66516f689a2e..e96eb400831539dc9bbc5d2a4d351d385c46c77a 100644
|
| --- a/tools/gn/substitution_writer.cc
|
| +++ b/tools/gn/substitution_writer.cc
|
| @@ -547,11 +547,13 @@ std::string SubstitutionWriter::GetLinkerSubstitution(
|
| // Fall-through to the linker-specific ones.
|
| switch (type) {
|
| case SUBSTITUTION_OUTPUT_EXTENSION:
|
| - // Use the extension provided on the target if nonempty, otherwise
|
| + // Use the extension provided on the target if specified, otherwise
|
| // fall back on the default. Note that the target's output extension
|
| // does not include the dot but the tool's does.
|
| - if (target->output_extension().empty())
|
| + if (!target->output_extension_set())
|
| return tool->default_output_extension();
|
| + if (target->output_extension().empty())
|
| + return std::string(); // Explicitly set to no extension.
|
| return std::string(".") + target->output_extension();
|
|
|
| default:
|
|
|