| 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..3c2a3050b198bb5111cc49541dcfa668ac29d458 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,31 @@ bool BinaryTargetGenerator::FillAllowCircularIncludesFrom() {
|
| target_->allow_circular_includes_from().insert(cur);
|
| return true;
|
| }
|
| +
|
| +bool BinaryTargetGenerator::FillDarwinBundle() {
|
| + // This flag only applies to executable and shared_library target types.
|
| + if (target_->output_type() == Target::STATIC_LIBRARY)
|
| + 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;
|
| +}
|
| +
|
| +bool BinaryTargetGenerator::FillLoadableModule() {
|
| + // This flag only applies to shared_library target types.
|
| + if (target_->output_type() != Target::SHARED_LIBRARY)
|
| + return true;
|
| +
|
| + const Value* value = scope_->GetValue(variables::kLoadableModule, true);
|
| + if (value) {
|
| + if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
|
| + return false;
|
| + target_->set_loadable_module(value->boolean_value());
|
| + }
|
| + return true;
|
| +}
|
|
|