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 if (enable_stripping) { |
| 313 args += [ "-Wcrl,strip,-x,-S" ] |
| 314 } |
304 } | 315 } |
305 } | 316 } |
306 | 317 |
307 if (!ios_enable_code_signing) { | 318 if (!ios_enable_code_signing) { |
308 # If codesigning is enabled, the binary will be copied into the bundle | 319 # 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). | 320 # by the codesigning script (as the binary is updated by the signature). |
310 # Otherwise, this "bundle_data" declares the location of the binary in | 321 # Otherwise, this "bundle_data" declares the location of the binary in |
311 # the .app bundle. | 322 # the .app bundle. |
312 bundle_data(_bundle_data_executable) { | 323 bundle_data(_bundle_data_executable) { |
313 forward_variables_from(invoker, [ "testonly" ]) | 324 forward_variables_from(invoker, [ "testonly" ]) |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 public_deps = [ | 826 public_deps = [ |
816 ":$_framework_target+link$_toolchain_suffix", | 827 ":$_framework_target+link$_toolchain_suffix", |
817 ] | 828 ] |
818 } | 829 } |
819 } | 830 } |
820 } | 831 } |
821 | 832 |
822 set_defaults("ios_framework_bundle") { | 833 set_defaults("ios_framework_bundle") { |
823 configs = default_shared_library_configs | 834 configs = default_shared_library_configs |
824 } | 835 } |
OLD | NEW |