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; |
+} |