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

Unified Diff: tools/gn/ninja_binary_target_writer.cc

Issue 1868023002: Add GN output prefix override and allow empty output extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/function_toolchain.cc ('k') | tools/gn/ninja_binary_target_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/ninja_binary_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698