OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
6 import("//build/config/mac/base_rules.gni") | 6 import("//build/config/mac/base_rules.gni") |
| 7 import("//build/config/mac/symbols.gni") |
7 | 8 |
8 # Generates Info.plist files for Mac apps and frameworks. | 9 # Generates Info.plist files for Mac apps and frameworks. |
9 # | 10 # |
10 # Arguments | 11 # Arguments |
11 # | 12 # |
12 # info_plist: | 13 # info_plist: |
13 # (optional) string, path to the Info.plist file that will be used for | 14 # (optional) string, path to the Info.plist file that will be used for |
14 # the bundle. | 15 # the bundle. |
15 # | 16 # |
16 # info_plist_target: | 17 # info_plist_target: |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 # Create the multi-architecture binary from all the single architecture | 273 # Create the multi-architecture binary from all the single architecture |
273 # binaries using "lipo". This target exists for the default toolchain | 274 # binaries using "lipo". This target exists for the default toolchain |
274 # of a fat-build only and depends on the expansion of "ios_app_bundle" | 275 # of a fat-build only and depends on the expansion of "ios_app_bundle" |
275 # for the other toolchains (i.e. a single "executable" target). | 276 # for the other toolchains (i.e. a single "executable" target). |
276 # | 277 # |
277 # This action only happens once per "ios_app_bundle" template (for the | 278 # This action only happens once per "ios_app_bundle" template (for the |
278 # main toolchain). | 279 # main toolchain). |
279 action(_lipo_executable) { | 280 action(_lipo_executable) { |
280 forward_variables_from(invoker, [ "testonly" ]) | 281 forward_variables_from(invoker, [ "testonly" ]) |
281 visibility = _lipo_executable_visibility | 282 visibility = _lipo_executable_visibility |
282 script = "//build/config/mac/xcrun.py" | 283 script = "//build/toolchain/mac/linker_driver.py" |
283 outputs = [ | 284 outputs = [ |
284 _executable_path, | 285 _executable_path, |
285 ] | 286 ] |
286 inputs = [ | 287 inputs = [ |
287 _arch_executable_path, | 288 _arch_executable_path, |
288 ] | 289 ] |
289 deps = [ | 290 deps = [ |
290 ":$_link_executable", | 291 ":$_link_executable", |
291 ] | 292 ] |
292 foreach(_additional_toolchain, additional_toolchains) { | 293 foreach(_additional_toolchain, additional_toolchains) { |
293 _additional_toolchain_target = "$_target_name($_additional_toolchain)" | 294 _additional_toolchain_target = "$_target_name($_additional_toolchain)" |
294 deps += [ ":$_additional_toolchain_target" ] | 295 deps += [ ":$_additional_toolchain_target" ] |
295 inputs += [ get_label_info(_additional_toolchain_target, | 296 inputs += [ get_label_info(_additional_toolchain_target, |
296 "root_out_dir") + "/$_output_name" ] | 297 "root_out_dir") + "/$_output_name" ] |
297 } | 298 } |
298 args = [ | 299 args = [ |
| 300 "xcrun", |
299 "lipo", | 301 "lipo", |
300 "-create", | 302 "-create", |
301 "-output", | 303 "-output", |
302 rebase_path(outputs[0], root_build_dir), | 304 rebase_path(outputs[0], root_build_dir), |
303 ] + rebase_path(inputs, root_build_dir) | 305 ] + rebase_path(inputs, root_build_dir) |
| 306 |
| 307 if (enable_dsyms) { |
| 308 outputs += [ "$root_out_dir/$_output_name.dSYM/" ] |
| 309 args += |
| 310 [ "-Wcrl,dsym," + rebase_path("$root_out_dir/.", root_build_dir) ] |
| 311 } |
| 312 |
| 313 if (enable_stripping) { |
| 314 # Check whether //build/config/mac:strip_all has been removed from |
| 315 # the configs variable (as this is how stripping is disabled for a |
| 316 # single target). |
| 317 _strip_all_in_config = false |
| 318 if (defined(invoker.configs)) { |
| 319 foreach(_config, invoker.configs) { |
| 320 if (_config == "//build/config/mac:strip_all") { |
| 321 _strip_all_in_config = true |
| 322 } |
| 323 } |
| 324 } |
| 325 |
| 326 if (_strip_all_in_config) { |
| 327 args += [ "-Wcrl,strip,-x,-S" ] |
| 328 |
| 329 if (save_unstripped_output) { |
| 330 outputs += [ outputs[0] + ".unstripped" ] |
| 331 args += [ "-Wcrl,unstripped," + |
| 332 rebase_path(get_path_info(outputs[0], "dir"), |
| 333 root_build_dir) ] |
| 334 } |
| 335 } |
| 336 } |
304 } | 337 } |
305 } | 338 } |
306 | 339 |
307 if (!ios_enable_code_signing) { | 340 if (!ios_enable_code_signing) { |
308 # If codesigning is enabled, the binary will be copied into the bundle | 341 # If codesigning is enabled, the binary will be copied into the bundle |
309 # by the codesigning script (as the binary is updated by the signature). | 342 # by the codesigning script (as the binary is updated by the signature). |
310 # Otherwise, this "bundle_data" declares the location of the binary in | 343 # Otherwise, this "bundle_data" declares the location of the binary in |
311 # the .app bundle. | 344 # the .app bundle. |
312 bundle_data(_bundle_data_executable) { | 345 bundle_data(_bundle_data_executable) { |
313 forward_variables_from(invoker, [ "testonly" ]) | 346 forward_variables_from(invoker, [ "testonly" ]) |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 public_deps = [ | 848 public_deps = [ |
816 ":$_framework_target+link$_toolchain_suffix", | 849 ":$_framework_target+link$_toolchain_suffix", |
817 ] | 850 ] |
818 } | 851 } |
819 } | 852 } |
820 } | 853 } |
821 | 854 |
822 set_defaults("ios_framework_bundle") { | 855 set_defaults("ios_framework_bundle") { |
823 configs = default_shared_library_configs | 856 configs = default_shared_library_configs |
824 } | 857 } |
OLD | NEW |