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

Unified Diff: tools/gn/binary_target_generator.cc

Issue 1386783003: [GN]: Support for loadable modules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit tests Created 5 years, 2 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
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..bb6668f170e4f6978bba914703821b7ca592992b 100644
--- a/tools/gn/binary_target_generator.cc
+++ b/tools/gn/binary_target_generator.cc
@@ -55,6 +55,9 @@ void BinaryTargetGenerator::DoRun() {
if (!FillCompleteStaticLib())
return;
+ if (!FillDarwinBundle())
+ return;
+
// Config values (compiler flags, etc.) set directly on this target.
ConfigValuesGenerator gen(&target_->config_values(), scope_,
scope_->GetSourceDir(), err_);
@@ -131,3 +134,18 @@ bool BinaryTargetGenerator::FillAllowCircularIncludesFrom() {
target_->allow_circular_includes_from().insert(cur);
return true;
}
+
+bool BinaryTargetGenerator::FillDarwinBundle() {
+ // This flag only applies to executable, shared_library, and loadable_module
+ // target types.
+ if (target_->output_type() == Target::STATIC_LIBRARY)
brettw 2015/10/13 22:59:07 This code should also be run for source sets. I th
Bons 2015/10/13 23:12:47 removed so non-issue.
+ return true;
+
+ const Value* value = scope_->GetValue(variables::kDarwinBundle, true);
+ if (value) {
+ if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
+ return false;
+ target_->set_darwin_bundle(value->boolean_value());
+ }
+ return true;
+}

Powered by Google App Engine
This is Rietveld 408576698