OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires | 5 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires |
6 # some enhancements since the commands on Mac are slightly different than on | 6 # some enhancements since the commands on Mac are slightly different than on |
7 # Linux. | 7 # Linux. |
8 | 8 |
9 import("../goma.gni") | 9 import("../goma.gni") |
10 import("//build/config/clang/clang.gni") | 10 import("//build/config/clang/clang.gni") |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 | 85 |
86 cc = "${_compiler_prefix}clang" | 86 cc = "${_compiler_prefix}clang" |
87 cxx = "${_compiler_prefix}clang++" | 87 cxx = "${_compiler_prefix}clang++" |
88 ld = cxx | 88 ld = cxx |
89 | 89 |
90 linker_driver = | 90 linker_driver = |
91 "TOOL_VERSION=${tool_versions.linker_driver} " + | 91 "TOOL_VERSION=${tool_versions.linker_driver} " + |
92 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir) | 92 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir) |
93 | 93 |
94 if (invoker.toolchain_os == "ios" && additional_toolchains != []) { | 94 # On iOS, the final applications are assembled using lipo (to support fat |
95 # For a fat build, the generation of dSYM needs to be performed after the | 95 # builds). The correct flags are passed to the linker_driver.py script |
96 # generation of the fat binaries using "lipo". So disable the generation | 96 # directly during the lipo call. |
97 # of the dSYM for intermediate architecture specific binaries. | 97 if (invoker.toolchain_os != "ios") { |
| 98 _enable_dsyms = enable_dsyms |
| 99 _save_unstripped_output = save_unstripped_output |
| 100 } else { |
98 _enable_dsyms = false | 101 _enable_dsyms = false |
99 _save_unstripped_output = false | 102 _save_unstripped_output = false |
100 } else { | |
101 _enable_dsyms = enable_dsyms | |
102 _save_unstripped_output = save_unstripped_output | |
103 } | 103 } |
104 | 104 |
105 # Make these apply to all tools below. | 105 # Make these apply to all tools below. |
106 lib_switch = "-l" | 106 lib_switch = "-l" |
107 lib_dir_switch = "-L" | 107 lib_dir_switch = "-L" |
108 | 108 |
109 # Object files go in this directory. Use label_name instead of | 109 # Object files go in this directory. Use label_name instead of |
110 # target_output_name since labels will generally have no spaces and will be | 110 # target_output_name since labels will generally have no spaces and will be |
111 # unique in the directory. | 111 # unique in the directory. |
112 object_subdir = "{{target_out_dir}}/{{label_name}}" | 112 object_subdir = "{{target_out_dir}}/{{label_name}}" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 mac_toolchain("ios_clang_x86") { | 422 mac_toolchain("ios_clang_x86") { |
423 toolchain_cpu = "x86" | 423 toolchain_cpu = "x86" |
424 toolchain_os = "ios" | 424 toolchain_os = "ios" |
425 } | 425 } |
426 | 426 |
427 mac_toolchain("ios_clang_x64") { | 427 mac_toolchain("ios_clang_x64") { |
428 toolchain_cpu = "x64" | 428 toolchain_cpu = "x64" |
429 toolchain_os = "ios" | 429 toolchain_os = "ios" |
430 } | 430 } |
431 } | 431 } |
OLD | NEW |