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

Unified Diff: tools/gn/binary_target_generator.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/binary_target_generator.h ('k') | tools/gn/docs/reference.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/binary_target_generator.cc
diff --git a/tools/gn/binary_target_generator.cc b/tools/gn/binary_target_generator.cc
index 923d0edd7a95f37ac66538e62a67cefcf68aac52..7c81232dacc2de445f9451bed52a953d84cd3964 100644
--- a/tools/gn/binary_target_generator.cc
+++ b/tools/gn/binary_target_generator.cc
@@ -31,6 +31,9 @@ void BinaryTargetGenerator::DoRun() {
if (!FillOutputName())
return;
+ if (!FillOutputPrefixOverride())
+ return;
+
if (!FillOutputExtension())
return;
@@ -85,6 +88,16 @@ bool BinaryTargetGenerator::FillOutputName() {
return true;
}
+bool BinaryTargetGenerator::FillOutputPrefixOverride() {
+ const Value* value = scope_->GetValue(variables::kOutputPrefixOverride, true);
+ if (!value)
+ return true;
+ if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
+ return false;
+ target_->set_output_prefix_override(value->boolean_value());
+ return true;
+}
+
bool BinaryTargetGenerator::FillOutputExtension() {
const Value* value = scope_->GetValue(variables::kOutputExtension, true);
if (!value)
« no previous file with comments | « tools/gn/binary_target_generator.h ('k') | tools/gn/docs/reference.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698