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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 "Goma and cc_wrapper can't be used together.") | 116 "Goma and cc_wrapper can't be used together.") |
117 compiler_prefix = "$goma_dir/gomacc " | 117 compiler_prefix = "$goma_dir/gomacc " |
118 } else if (toolchain_cc_wrapper != "") { | 118 } else if (toolchain_cc_wrapper != "") { |
119 compiler_prefix = toolchain_cc_wrapper + " " | 119 compiler_prefix = toolchain_cc_wrapper + " " |
120 } else { | 120 } else { |
121 compiler_prefix = "" | 121 compiler_prefix = "" |
122 } | 122 } |
123 | 123 |
124 cc = compiler_prefix + _cc | 124 cc = compiler_prefix + _cc |
125 cxx = compiler_prefix + _cxx | 125 cxx = compiler_prefix + _cxx |
126 ld = _cxx | |
126 | 127 |
127 if (use_clang_static_analyzer) { | 128 if (use_clang_static_analyzer) { |
128 # Static analysis isn't supported under GOMA. See crbug.com/687245 | 129 # Static analysis isn't supported under GOMA. See crbug.com/687245 |
129 # for progress on this issue. | 130 # for progress on this issue. |
130 assert(!use_goma, "'use_clang_static_analyzer' cannot be used with GOMA.") | 131 assert(!use_goma, "'use_clang_static_analyzer' cannot be used with GOMA.") |
131 | 132 |
132 # Call "ccc-analyzer" or "c++-analyzer" instead of directly calling Clang. | 133 # Call "ccc-analyzer" or "c++-analyzer" instead of directly calling Clang. |
133 # |wrapper_tool| sets the environment variables which are read by the | 134 # |wrapper_tool| sets the environment variables which are read by the |
134 # analyzer tools. | 135 # analyzer tools. |
135 analyzer_wrapper = | 136 analyzer_wrapper = |
136 rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py", | 137 rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py", |
137 root_build_dir) | 138 root_build_dir) |
138 cc = analyzer_wrapper + " --clang-cc-path=${cc} --analyzer=" + | 139 cc = analyzer_wrapper + " --clang-cc-path=${cc} --analyzer=" + |
139 rebase_path("//third_party/scan-build/src/libexec/ccc-analyzer", | 140 rebase_path("//third_party/scan-build/src/libexec/ccc-analyzer", |
140 root_build_dir) | 141 root_build_dir) |
141 cxx = analyzer_wrapper + " --clang-cxx-path=${cxx} --analyzer=" + | 142 cxx = analyzer_wrapper + " --clang-cxx-path=${cxx} --analyzer=" + |
142 rebase_path("//third_party/scan-build/src/libexec/c++-analyzer", | 143 rebase_path("//third_party/scan-build/src/libexec/c++-analyzer", |
143 root_build_dir) | 144 root_build_dir) |
145 | |
146 ld = cxx | |
sdefresne
2017/02/02 11:51:14
I think you can remove this line. The default abov
| |
144 } | 147 } |
145 | 148 |
146 ld = cxx | |
147 | |
148 linker_driver = | 149 linker_driver = |
149 "TOOL_VERSION=${tool_versions.linker_driver} " + | 150 "TOOL_VERSION=${tool_versions.linker_driver} " + |
150 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir) | 151 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir) |
151 | 152 |
152 # On iOS, the final applications are assembled using lipo (to support fat | 153 # On iOS, the final applications are assembled using lipo (to support fat |
153 # builds). The correct flags are passed to the linker_driver.py script | 154 # builds). The correct flags are passed to the linker_driver.py script |
154 # directly during the lipo call. | 155 # directly during the lipo call. |
155 if (toolchain_args.current_os != "ios") { | 156 if (toolchain_args.current_os != "ios") { |
156 _enable_dsyms = enable_dsyms | 157 _enable_dsyms = enable_dsyms |
157 _save_unstripped_output = save_unstripped_output | 158 _save_unstripped_output = save_unstripped_output |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
520 } | 521 } |
521 } | 522 } |
522 | 523 |
523 mac_toolchain("ios_clang_x64") { | 524 mac_toolchain("ios_clang_x64") { |
524 toolchain_args = { | 525 toolchain_args = { |
525 current_cpu = "x64" | 526 current_cpu = "x64" |
526 current_os = "ios" | 527 current_os = "ios" |
527 } | 528 } |
528 } | 529 } |
529 } | 530 } |
OLD | NEW |