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

Unified Diff: build/config/ios/rules.gni

Issue 2245903002: Revert of Always enable intermediate source_set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dependency
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/ios/rules.gni
diff --git a/build/config/ios/rules.gni b/build/config/ios/rules.gni
index 0ceb265883c8bdc0c6aed720b6323cae8e9509bd..e21779fd43e9392e175a1324de811be6fb956d34 100644
--- a/build/config/ios/rules.gni
+++ b/build/config/ios/rules.gni
@@ -5,6 +5,12 @@
import("//build/config/ios/ios_sdk.gni")
import("//build/config/mac/base_rules.gni")
import("//build/config/mac/symbols.gni")
+
+# Control whether an intermediate source_set is used when building executables
+# and shared_libraries for ios_app_bundle and ios_framework_bundle. This is a
+# temporary flag that will be removed once scoped_nsobject_unittest{_arc}.mm
+# tests are passing with this flag set to true (see crbug.com/637065)
+_use_intermediate_source_set = false
# Invokes lipo on multiple arch-specific binaries to create a fat binary.
#
@@ -369,25 +375,30 @@
_arch_executable_target = _target_name + "_arch_executable"
_lipo_executable_target = _target_name + "_executable"
- source_set(_arch_executable_source) {
- forward_variables_from(invoker,
- "*",
- [
- "bundle_deps",
- "bundle_deps_filter",
- "bundle_extension",
- "enable_code_signing",
- "entitlements_path",
- "extra_substitutions",
- "extra_system_frameworks",
- "info_plist",
- "info_plist_target",
- "output_name",
- "product_type",
- "visibility",
- ])
-
- visibility = [ ":$_arch_executable_target" ]
+ if (_use_intermediate_source_set) {
+ source_set(_arch_executable_source) {
+ forward_variables_from(invoker,
+ "*",
+ [
+ "bundle_deps",
+ "bundle_deps_filter",
+ "bundle_extension",
+ "enable_code_signing",
+ "entitlements_path",
+ "extra_substitutions",
+ "extra_system_frameworks",
+ "info_plist",
+ "info_plist_target",
+ "output_name",
+ "product_type",
+ "visibility",
+ ])
+
+ visibility = [ ":$_arch_executable_target" ]
+ }
+ } else {
+ assert(_arch_executable_source != "",
+ "mark _arch_executable_source as used")
}
if (use_ios_simulator) {
@@ -415,6 +426,9 @@
"sources",
"visibility",
])
+ if (!_use_intermediate_source_set) {
+ forward_variables_from(invoker, [ "sources" ])
+ }
visibility = [ ":$_lipo_executable_target($default_toolchain)" ]
if (current_toolchain != default_toolchain) {
@@ -424,7 +438,9 @@
if (!defined(deps)) {
deps = []
}
- deps += [ ":$_arch_executable_source" ]
+ if (_use_intermediate_source_set) {
+ deps += [ ":$_arch_executable_source" ]
+ }
if (!defined(libs)) {
libs = []
@@ -862,33 +878,38 @@
_arch_shared_library_target = _target_name + "_arch_shared_library"
_lipo_shared_library_target = _target_name + "_shared_library"
- source_set(_arch_shared_library_source) {
- forward_variables_from(invoker,
- "*",
- [
- "bundle_deps",
- "bundle_deps_filter",
- "data_deps",
- "enable_code_signing",
- "info_plist",
- "info_plist_target",
- "output_name",
- "visibility",
- ])
-
- visibility = [ ":$_arch_shared_library_target" ]
-
- if (_has_public_headers) {
- configs += [
- ":$_framework_headers_config($default_toolchain)",
- ":$_headers_map_config($default_toolchain)",
- ]
-
- if (!defined(deps)) {
- deps = []
- }
- deps += [ ":$_framework_headers_target($default_toolchain)" ]
- }
+ if (_use_intermediate_source_set) {
+ source_set(_arch_shared_library_source) {
+ forward_variables_from(invoker,
+ "*",
+ [
+ "bundle_deps",
+ "bundle_deps_filter",
+ "data_deps",
+ "enable_code_signing",
+ "info_plist",
+ "info_plist_target",
+ "output_name",
+ "visibility",
+ ])
+
+ visibility = [ ":$_arch_shared_library_target" ]
+
+ if (_has_public_headers) {
+ configs += [
+ ":$_framework_headers_config($default_toolchain)",
+ ":$_headers_map_config($default_toolchain)",
+ ]
+
+ if (!defined(deps)) {
+ deps = []
+ }
+ deps += [ ":$_framework_headers_target($default_toolchain)" ]
+ }
+ }
+ } else {
+ assert(_arch_shared_library_source != "",
+ "mark _arch_shared_library_source as used")
}
shared_library(_arch_shared_library_target) {
@@ -905,6 +926,9 @@
"sources",
"visibility",
])
+ if (!_use_intermediate_source_set) {
+ forward_variables_from(invoker, [ "sources" ])
+ }
visibility = [ ":$_lipo_shared_library_target($default_toolchain)" ]
if (current_toolchain != default_toolchain) {
@@ -914,7 +938,21 @@
if (!defined(deps)) {
deps = []
}
- deps += [ ":$_arch_shared_library_source" ]
+ if (_use_intermediate_source_set) {
+ deps += [ ":$_arch_shared_library_source" ]
+ } else {
+ if (_has_public_headers) {
+ configs += [
+ ":$_framework_headers_config($default_toolchain)",
+ ":$_headers_map_config($default_toolchain)",
+ ]
+
+ if (!defined(deps)) {
+ deps = []
+ }
+ deps += [ ":$_framework_headers_target($default_toolchain)" ]
+ }
+ }
output_extension = ""
output_name = _output_name
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698