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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 cxx = invoker.cxx | 45 cxx = invoker.cxx |
46 ld = invoker.ld | 46 ld = invoker.ld |
47 | 47 |
48 # Make these apply to all tools below. | 48 # Make these apply to all tools below. |
49 lib_switch = "-l" | 49 lib_switch = "-l" |
50 lib_dir_switch = "-L" | 50 lib_dir_switch = "-L" |
51 | 51 |
52 # Object files go in this directory. Use label_name instead of | 52 # Object files go in this directory. Use label_name instead of |
53 # target_output_name since labels will generally have no spaces and will be | 53 # target_output_name since labels will generally have no spaces and will be |
54 # unique in the directory. | 54 # unique in the directory. |
55 # TODO(brettw) enable the label_name variant when binary support is rolled i
n to GN. | 55 object_subdir = "{{target_out_dir}}/{{label_name}}" |
56 #object_subdir = "{{target_out_dir}}/{{label_name}}" | |
57 object_subdir = "{{target_out_dir}}/{{target_output_name}}" | |
58 | 56 |
59 tool("cc") { | 57 tool("cc") { |
60 depfile = "{{output}}.d" | 58 depfile = "{{output}}.d" |
61 precompiled_header_type = "gcc" | 59 precompiled_header_type = "gcc" |
62 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 60 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" |
63 depsformat = "gcc" | 61 depsformat = "gcc" |
64 description = "CC {{output}}" | 62 description = "CC {{output}}" |
65 outputs = [ | 63 outputs = [ |
66 "$object_subdir/{{source_name_part}}.o", | 64 "$object_subdir/{{source_name_part}}.o", |
67 ] | 65 ] |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 } | 294 } |
297 | 295 |
298 mac_toolchain("x64") { | 296 mac_toolchain("x64") { |
299 toolchain_cpu = "x64" | 297 toolchain_cpu = "x64" |
300 toolchain_os = "mac" | 298 toolchain_os = "mac" |
301 cc = "${goma_prefix}/gcc" | 299 cc = "${goma_prefix}/gcc" |
302 cxx = "${goma_prefix}/g++" | 300 cxx = "${goma_prefix}/g++" |
303 ld = cxx | 301 ld = cxx |
304 is_clang = false | 302 is_clang = false |
305 } | 303 } |
OLD | NEW |