| 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/ios/ios_sdk.gni") | 10 import("//build/config/ios/ios_sdk.gni") |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 depsformat = "gcc" | 78 depsformat = "gcc" |
| 79 description = "CXX {{output}}" | 79 description = "CXX {{output}}" |
| 80 outputs = [ | 80 outputs = [ |
| 81 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 81 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
| 82 ] | 82 ] |
| 83 } | 83 } |
| 84 | 84 |
| 85 tool("asm") { | 85 tool("asm") { |
| 86 # For GCC we can just use the C compiler to compile assembly. | 86 # For GCC we can just use the C compiler to compile assembly. |
| 87 depfile = "{{output}}.d" | 87 depfile = "{{output}}.d" |
| 88 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_fla
gs $toolchain_flags {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" | 88 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_fla
gs $toolchain_flags {{asmflags}} -c {{source}} -o {{output}}" |
| 89 depsformat = "gcc" | 89 depsformat = "gcc" |
| 90 description = "ASM {{output}}" | 90 description = "ASM {{output}}" |
| 91 outputs = [ | 91 outputs = [ |
| 92 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 92 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
| 93 ] | 93 ] |
| 94 } | 94 } |
| 95 | 95 |
| 96 tool("objc") { | 96 tool("objc") { |
| 97 depfile = "{{output}}.d" | 97 depfile = "{{output}}.d" |
| 98 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_fl
ags $toolchain_flags {{cflags}} {{cflags_c}} {{cflags_objc}} -c {{source}} -o {{
output}}" | 98 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} $sysroot_fl
ags $toolchain_flags {{cflags}} {{cflags_c}} {{cflags_objc}} -c {{source}} -o {{
output}}" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 tool("stamp") { | 186 tool("stamp") { |
| 187 command = "touch {{output}}" | 187 command = "touch {{output}}" |
| 188 description = "STAMP {{output}}" | 188 description = "STAMP {{output}}" |
| 189 } | 189 } |
| 190 | 190 |
| 191 tool("copy") { | 191 tool("copy") { |
| 192 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &
& cp -af {{source}} {{output}})" | 192 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} &
& cp -af {{source}} {{output}})" |
| 193 description = "COPY {{source}} {{output}}" | 193 description = "COPY {{source}} {{output}}" |
| 194 } | 194 } |
| 195 | 195 |
| 196 toolchain_args() { | 196 toolchain_args = { |
| 197 current_cpu = invoker.toolchain_cpu | 197 current_cpu = invoker.toolchain_cpu |
| 198 current_os = invoker.toolchain_os | 198 current_os = invoker.toolchain_os |
| 199 | 199 |
| 200 # These values need to be passed through unchanged. | 200 # These values need to be passed through unchanged. |
| 201 target_os = target_os | 201 target_os = target_os |
| 202 target_cpu = target_cpu | 202 target_cpu = target_cpu |
| 203 | 203 |
| 204 if (defined(invoker.is_clang)) { | 204 if (defined(invoker.is_clang)) { |
| 205 is_clang = invoker.is_clang | 205 is_clang = invoker.is_clang |
| 206 } | 206 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 toolchain_cpu = "i386" | 252 toolchain_cpu = "i386" |
| 253 toolchain_os = "mac" | 253 toolchain_os = "mac" |
| 254 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 254 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| 255 root_build_dir) | 255 root_build_dir) |
| 256 cc = "${goma_prefix}$prefix/clang" | 256 cc = "${goma_prefix}$prefix/clang" |
| 257 cxx = "${goma_prefix}$prefix/clang++" | 257 cxx = "${goma_prefix}$prefix/clang++" |
| 258 ld = cxx | 258 ld = cxx |
| 259 is_clang = true | 259 is_clang = true |
| 260 sysroot_flags = "-isysroot $mac_sdk_path -mmacosx-version-min=$mac_sdk_min" | 260 sysroot_flags = "-isysroot $mac_sdk_path -mmacosx-version-min=$mac_sdk_min" |
| 261 } | 261 } |
| OLD | NEW |