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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 cc = invoker.cc | 43 cc = invoker.cc |
44 cxx = invoker.cxx | 44 cxx = invoker.cxx |
45 ld = invoker.ld | 45 ld = invoker.ld |
46 | 46 |
47 # Make these apply to all tools below. | 47 # Make these apply to all tools below. |
48 lib_switch = "-l" | 48 lib_switch = "-l" |
49 lib_dir_switch = "-L" | 49 lib_dir_switch = "-L" |
50 | 50 |
51 tool("cc") { | 51 tool("cc") { |
52 depfile = "{{output}}.d" | 52 depfile = "{{output}}.d" |
53 | 53 precompiled_header_type = "gcc" |
54 # TODO(andybons): enable this when GCC PCH support in the binary has been | |
55 # rolled. | |
56 #precompiled_header_type = "gcc" | |
57 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 54 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" |
58 depsformat = "gcc" | 55 depsformat = "gcc" |
59 description = "CC {{output}}" | 56 description = "CC {{output}}" |
60 outputs = [ | 57 outputs = [ |
61 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 58 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
62 ] | 59 ] |
63 } | 60 } |
64 | 61 |
65 tool("cxx") { | 62 tool("cxx") { |
66 depfile = "{{output}}.d" | 63 depfile = "{{output}}.d" |
67 | 64 precompiled_header_type = "gcc" |
68 # TODO(andybons): enable this when GCC PCH support in the binary has been | |
69 # rolled. | |
70 #precompiled_header_type = "gcc" | |
71 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_cc}} -c {{source}} -o {{output}}" | 65 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_cc}} -c {{source}} -o {{output}}" |
72 depsformat = "gcc" | 66 depsformat = "gcc" |
73 description = "CXX {{output}}" | 67 description = "CXX {{output}}" |
74 outputs = [ | 68 outputs = [ |
75 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 69 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
76 ] | 70 ] |
77 } | 71 } |
78 | 72 |
79 tool("asm") { | 73 tool("asm") { |
80 # For GCC we can just use the C compiler to compile assembly. | 74 # For GCC we can just use the C compiler to compile assembly. |
81 depfile = "{{output}}.d" | 75 depfile = "{{output}}.d" |
82 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 76 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}}
-c {{source}} -o {{output}}" |
83 depsformat = "gcc" | 77 depsformat = "gcc" |
84 description = "ASM {{output}}" | 78 description = "ASM {{output}}" |
85 outputs = [ | 79 outputs = [ |
86 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 80 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
87 ] | 81 ] |
88 } | 82 } |
89 | 83 |
90 tool("objc") { | 84 tool("objc") { |
91 depfile = "{{output}}.d" | 85 depfile = "{{output}}.d" |
92 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objc}} -c {{source}} -o {{output}}" | 86 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objc}} -c {{source}} -o {{output}}" |
93 | 87 precompiled_header_type = "gcc" |
94 # TODO(andybons): enable this when GCC PCH support in the binary has been | |
95 # rolled. | |
96 #precompiled_header_type = "gcc" | |
97 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" | 88 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" |
98 depsformat = "gcc" | 89 depsformat = "gcc" |
99 description = "OBJC {{output}}" | 90 description = "OBJC {{output}}" |
100 outputs = [ | 91 outputs = [ |
101 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 92 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
102 ] | 93 ] |
103 } | 94 } |
104 | 95 |
105 tool("objcxx") { | 96 tool("objcxx") { |
106 depfile = "{{output}}.d" | 97 depfile = "{{output}}.d" |
107 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objcc}} -c {{source}} -o {{output}}" | 98 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objcc}} -c {{source}} -o {{output}}" |
108 | 99 precompiled_header_type = "gcc" |
109 # TODO(andybons): enable this when GCC PCH support in the binary has been | |
110 # rolled. | |
111 #precompiled_header_type = "gcc" | |
112 depsformat = "gcc" | 100 depsformat = "gcc" |
113 description = "OBJCXX {{output}}" | 101 description = "OBJCXX {{output}}" |
114 outputs = [ | 102 outputs = [ |
115 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 103 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
116 ] | 104 ] |
117 } | 105 } |
118 | 106 |
119 tool("alink") { | 107 tool("alink") { |
120 command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -stat
ic -o {{output}} {{inputs}}" | 108 command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -stat
ic -o {{output}} {{inputs}}" |
121 description = "LIBTOOL-STATIC {{output}}" | 109 description = "LIBTOOL-STATIC {{output}}" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 251 } |
264 | 252 |
265 mac_toolchain("x64") { | 253 mac_toolchain("x64") { |
266 toolchain_cpu = "x64" | 254 toolchain_cpu = "x64" |
267 toolchain_os = "mac" | 255 toolchain_os = "mac" |
268 cc = "${goma_prefix}/gcc" | 256 cc = "${goma_prefix}/gcc" |
269 cxx = "${goma_prefix}/g++" | 257 cxx = "${goma_prefix}/g++" |
270 ld = cxx | 258 ld = cxx |
271 is_clang = false | 259 is_clang = false |
272 } | 260 } |
OLD | NEW |