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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 # concurrent_links is picked up from the declare_arg(). | 85 # concurrent_links is picked up from the declare_arg(). |
86 | 86 |
87 cc = "${compiler_prefix}clang" | 87 cc = "${compiler_prefix}clang" |
88 cxx = "${compiler_prefix}clang++" | 88 cxx = "${compiler_prefix}clang++" |
89 ld = cxx | 89 ld = cxx |
90 | 90 |
91 linker_driver = | 91 linker_driver = |
92 "TOOL_VERSION=${tool_versions.linker_driver} " + | 92 "TOOL_VERSION=${tool_versions.linker_driver} " + |
93 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir) | 93 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir) |
94 | 94 |
95 if (is_ios && additional_toolchains != []) { | 95 if (invoker.toolchain_os == "ios" && additional_toolchains != []) { |
96 # For a fat build, the generation of dSYM needs to be performed after the | 96 # For a fat build, the generation of dSYM needs to be performed after the |
97 # generation of the fat binaries using "lipo". So disable the generation | 97 # generation of the fat binaries using "lipo". So disable the generation |
98 # of the dSYM for intermediate architecture specific binaries. | 98 # of the dSYM for intermediate architecture specific binaries. |
99 _enable_dsyms = false | 99 _enable_dsyms = false |
100 _save_unstripped_output = false | 100 _save_unstripped_output = false |
101 } else { | 101 } else { |
102 _enable_dsyms = enable_dsyms | 102 _enable_dsyms = enable_dsyms |
103 _save_unstripped_output = save_unstripped_output | 103 _save_unstripped_output = save_unstripped_output |
104 } | 104 } |
105 | 105 |
106 # Make these apply to all tools below. | 106 # Make these apply to all tools below. |
107 lib_switch = "-l" | 107 lib_switch = "-l" |
108 lib_dir_switch = "-L" | 108 lib_dir_switch = "-L" |
109 | 109 |
110 # Object files go in this directory. Use label_name instead of | 110 # Object files go in this directory. Use label_name instead of |
111 # target_output_name since labels will generally have no spaces and will be | 111 # target_output_name since labels will generally have no spaces and will be |
112 # unique in the directory. | 112 # unique in the directory. |
113 object_subdir = "{{target_out_dir}}/{{label_name}}" | 113 object_subdir = "{{target_out_dir}}/{{label_name}}" |
114 | 114 |
115 # If dSYMs are enabled, this flag will be added to the link tools. | 115 # If dSYMs are enabled, this flag will be added to the link tools. |
116 if (_enable_dsyms) { | 116 if (_enable_dsyms) { |
117 dsym_switch = " -Wcrl,dsym," + rebase_path(root_out_dir) + " " | 117 dsym_switch = " -Wcrl,dsym,{{root_out_dir}} " |
118 _dsym_output = | 118 _dsym_output = |
119 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM/" | 119 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM/" |
120 } else { | 120 } else { |
121 dsym_switch = "" | 121 dsym_switch = "" |
122 } | 122 } |
123 | 123 |
124 if (_save_unstripped_output) { | 124 if (_save_unstripped_output) { |
125 _unstripped_output = "{{root_out_dir}}/{{target_output_name}}{{output_exte
nsion}}.unstripped" | 125 _unstripped_output = "{{root_out_dir}}/{{target_output_name}}{{output_exte
nsion}}.unstripped" |
126 } | 126 } |
127 | 127 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 412 |
413 mac_toolchain("ios_clang_x86") { | 413 mac_toolchain("ios_clang_x86") { |
414 toolchain_cpu = "x86" | 414 toolchain_cpu = "x86" |
415 toolchain_os = "ios" | 415 toolchain_os = "ios" |
416 } | 416 } |
417 | 417 |
418 mac_toolchain("ios_clang_x64") { | 418 mac_toolchain("ios_clang_x64") { |
419 toolchain_cpu = "x64" | 419 toolchain_cpu = "x64" |
420 toolchain_os = "ios" | 420 toolchain_os = "ios" |
421 } | 421 } |
OLD | NEW |