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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
54 # TODO:(andybons): enable this when GCC PCH support in the binary has been | 54 # TODO(andybons): enable this when GCC PCH support in the binary has been |
55 # rolled. | 55 # rolled. |
56 #precompiled_header_type = "gcc" | 56 #precompiled_header_type = "gcc" |
57 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 57 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" |
58 depsformat = "gcc" | 58 depsformat = "gcc" |
59 description = "CC {{output}}" | 59 description = "CC {{output}}" |
60 outputs = [ | 60 outputs = [ |
61 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 61 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
62 ] | 62 ] |
63 } | 63 } |
64 | 64 |
65 tool("cxx") { | 65 tool("cxx") { |
66 depfile = "{{output}}.d" | 66 depfile = "{{output}}.d" |
67 | 67 |
68 # TODO:(andybons): enable this when GCC PCH support in the binary has been | 68 # TODO(andybons): enable this when GCC PCH support in the binary has been |
69 # rolled. | 69 # rolled. |
70 #precompiled_header_type = "gcc" | 70 #precompiled_header_type = "gcc" |
71 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_cc}} -c {{source}} -o {{output}}" | 71 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_cc}} -c {{source}} -o {{output}}" |
72 depsformat = "gcc" | 72 depsformat = "gcc" |
73 description = "CXX {{output}}" | 73 description = "CXX {{output}}" |
74 outputs = [ | 74 outputs = [ |
75 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 75 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
76 ] | 76 ] |
77 } | 77 } |
78 | 78 |
79 tool("asm") { | 79 tool("asm") { |
80 # For GCC we can just use the C compiler to compile assembly. | 80 # For GCC we can just use the C compiler to compile assembly. |
81 depfile = "{{output}}.d" | 81 depfile = "{{output}}.d" |
82 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" | 82 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {
{cflags_c}} -c {{source}} -o {{output}}" |
83 depsformat = "gcc" | 83 depsformat = "gcc" |
84 description = "ASM {{output}}" | 84 description = "ASM {{output}}" |
85 outputs = [ | 85 outputs = [ |
86 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 86 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
87 ] | 87 ] |
88 } | 88 } |
89 | 89 |
90 tool("objc") { | 90 tool("objc") { |
91 depfile = "{{output}}.d" | 91 depfile = "{{output}}.d" |
92 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objc}} -c {{source}} -o {{output}}" | 92 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objc}} -c {{source}} -o {{output}}" |
93 | 93 |
94 # TODO:(andybons): enable this when GCC PCH support in the binary has been | 94 # TODO(andybons): enable this when GCC PCH support in the binary has been |
95 # rolled. | 95 # rolled. |
96 #precompiled_header_type = "gcc" | 96 #precompiled_header_type = "gcc" |
97 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" | 97 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" |
98 depsformat = "gcc" | 98 depsformat = "gcc" |
99 description = "OBJC {{output}}" | 99 description = "OBJC {{output}}" |
100 outputs = [ | 100 outputs = [ |
101 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 101 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
102 ] | 102 ] |
103 } | 103 } |
104 | 104 |
105 tool("objcxx") { | 105 tool("objcxx") { |
106 depfile = "{{output}}.d" | 106 depfile = "{{output}}.d" |
107 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objcc}} -c {{source}} -o {{output}}" | 107 command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}}
{{cflags_objcc}} -c {{source}} -o {{output}}" |
108 | 108 |
109 # TODO:(andybons): enable this when GCC PCH support in the binary has been | 109 # TODO(andybons): enable this when GCC PCH support in the binary has been |
110 # rolled. | 110 # rolled. |
111 #precompiled_header_type = "gcc" | 111 #precompiled_header_type = "gcc" |
112 depsformat = "gcc" | 112 depsformat = "gcc" |
113 description = "OBJCXX {{output}}" | 113 description = "OBJCXX {{output}}" |
114 outputs = [ | 114 outputs = [ |
115 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", | 115 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", |
116 ] | 116 ] |
117 } | 117 } |
118 | 118 |
119 tool("alink") { | 119 tool("alink") { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 263 } |
264 | 264 |
265 mac_toolchain("x64") { | 265 mac_toolchain("x64") { |
266 toolchain_cpu = "x64" | 266 toolchain_cpu = "x64" |
267 toolchain_os = "mac" | 267 toolchain_os = "mac" |
268 cc = "${goma_prefix}/gcc" | 268 cc = "${goma_prefix}/gcc" |
269 cxx = "${goma_prefix}/g++" | 269 cxx = "${goma_prefix}/g++" |
270 ld = cxx | 270 ld = cxx |
271 is_clang = false | 271 is_clang = false |
272 } | 272 } |
OLD | NEW |