| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 dsym_switch = "" | 156 dsym_switch = "" |
| 157 } | 157 } |
| 158 | 158 |
| 159 if (_save_unstripped_output) { | 159 if (_save_unstripped_output) { |
| 160 _unstripped_output = "{{root_out_dir}}/{{target_output_name}}{{output_exte
nsion}}.unstripped" | 160 _unstripped_output = "{{root_out_dir}}/{{target_output_name}}{{output_exte
nsion}}.unstripped" |
| 161 } | 161 } |
| 162 | 162 |
| 163 tool("cc") { | 163 tool("cc") { |
| 164 depfile = "{{output}}.d" | 164 depfile = "{{output}}.d" |
| 165 precompiled_header_type = "gcc" | 165 precompiled_header_type = "gcc" |
| 166 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 166 command = "$env_wrapper $cc -MMD -MF $depfile {{defines}} {{include_dirs}}
{{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" |
| 167 depsformat = "gcc" | 167 depsformat = "gcc" |
| 168 description = "CC {{output}}" | 168 description = "CC {{output}}" |
| 169 outputs = [ | 169 outputs = [ |
| 170 "$object_subdir/{{source_name_part}}.o", | 170 "$object_subdir/{{source_name_part}}.o", |
| 171 ] | 171 ] |
| 172 } | 172 } |
| 173 | 173 |
| 174 tool("cxx") { | 174 tool("cxx") { |
| 175 depfile = "{{output}}.d" | 175 depfile = "{{output}}.d" |
| 176 precompiled_header_type = "gcc" | 176 precompiled_header_type = "gcc" |
| 177 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_cc}} -c {{source}} -o {{output}}" | 177 command = "$env_wrapper $cxx -MMD -MF $depfile {{defines}} {{include_dirs}
} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" |
| 178 depsformat = "gcc" | 178 depsformat = "gcc" |
| 179 description = "CXX {{output}}" | 179 description = "CXX {{output}}" |
| 180 outputs = [ | 180 outputs = [ |
| 181 "$object_subdir/{{source_name_part}}.o", | 181 "$object_subdir/{{source_name_part}}.o", |
| 182 ] | 182 ] |
| 183 } | 183 } |
| 184 | 184 |
| 185 tool("asm") { | 185 tool("asm") { |
| 186 # For GCC we can just use the C compiler to compile assembly. | 186 # For GCC we can just use the C compiler to compile assembly. |
| 187 depfile = "{{output}}.d" | 187 depfile = "{{output}}.d" |
| 188 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}}
-c {{source}} -o {{output}}" | 188 command = "$env_wrapper $cc -MMD -MF $depfile {{defines}} {{include_dirs}}
{{asmflags}} -c {{source}} -o {{output}}" |
| 189 depsformat = "gcc" | 189 depsformat = "gcc" |
| 190 description = "ASM {{output}}" | 190 description = "ASM {{output}}" |
| 191 outputs = [ | 191 outputs = [ |
| 192 "$object_subdir/{{source_name_part}}.o", | 192 "$object_subdir/{{source_name_part}}.o", |
| 193 ] | 193 ] |
| 194 } | 194 } |
| 195 | 195 |
| 196 tool("objc") { | 196 tool("objc") { |
| 197 depfile = "{{output}}.d" | 197 depfile = "{{output}}.d" |
| 198 precompiled_header_type = "gcc" | 198 precompiled_header_type = "gcc" |
| 199 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_objc}} -c {{source}} -o {{output}}" | 199 command = "$env_wrapper $cc -MMD -MF $depfile {{defines}} {{include_dirs}}
{{cflags}} {{cflags_objc}} -c {{source}} -o {{output}}" |
| 200 depsformat = "gcc" | 200 depsformat = "gcc" |
| 201 description = "OBJC {{output}}" | 201 description = "OBJC {{output}}" |
| 202 outputs = [ | 202 outputs = [ |
| 203 "$object_subdir/{{source_name_part}}.o", | 203 "$object_subdir/{{source_name_part}}.o", |
| 204 ] | 204 ] |
| 205 } | 205 } |
| 206 | 206 |
| 207 tool("objcxx") { | 207 tool("objcxx") { |
| 208 depfile = "{{output}}.d" | 208 depfile = "{{output}}.d" |
| 209 precompiled_header_type = "gcc" | 209 precompiled_header_type = "gcc" |
| 210 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objcc}} -c {{source}} -o {{output}}" | 210 command = "$env_wrapper $cxx -MMD -MF $depfile {{defines}} {{include_dirs}
} {{cflags}} {{cflags_objcc}} -c {{source}} -o {{output}}" |
| 211 depsformat = "gcc" | 211 depsformat = "gcc" |
| 212 description = "OBJCXX {{output}}" | 212 description = "OBJCXX {{output}}" |
| 213 outputs = [ | 213 outputs = [ |
| 214 "$object_subdir/{{source_name_part}}.o", | 214 "$object_subdir/{{source_name_part}}.o", |
| 215 ] | 215 ] |
| 216 } | 216 } |
| 217 | 217 |
| 218 tool("alink") { | 218 tool("alink") { |
| 219 script = | 219 script = |
| 220 rebase_path("//build/toolchain/mac/filter_libtool.py", root_build_dir) | 220 rebase_path("//build/toolchain/mac/filter_libtool.py", root_build_dir) |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 } | 453 } |
| 454 } | 454 } |
| 455 | 455 |
| 456 mac_toolchain("ios_clang_x64") { | 456 mac_toolchain("ios_clang_x64") { |
| 457 toolchain_args = { | 457 toolchain_args = { |
| 458 current_cpu = "x64" | 458 current_cpu = "x64" |
| 459 current_os = "ios" | 459 current_os = "ios" |
| 460 } | 460 } |
| 461 } | 461 } |
| 462 } | 462 } |
| OLD | NEW |