Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: build/toolchain/mac/BUILD.gn

Issue 1292983004: [GN]: Precompiled header support for GCC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/BUILD.gn ('k') | tools/gn/config_values_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
54 # TODO:(andybons): enable this when GCC PCH support in the binary has been
55 # rolled.
56 #precompiled_header_type = "gcc"
53 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}}"
54 depsformat = "gcc" 58 depsformat = "gcc"
55 description = "CC {{output}}" 59 description = "CC {{output}}"
56 outputs = [ 60 outputs = [
57 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", 61 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
58 ] 62 ]
59 } 63 }
60 64
61 tool("cxx") { 65 tool("cxx") {
62 depfile = "{{output}}.d" 66 depfile = "{{output}}.d"
67
68 # TODO:(andybons): enable this when GCC PCH support in the binary has been
69 # rolled.
70 #precompiled_header_type = "gcc"
63 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}}"
64 depsformat = "gcc" 72 depsformat = "gcc"
65 description = "CXX {{output}}" 73 description = "CXX {{output}}"
66 outputs = [ 74 outputs = [
67 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", 75 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
68 ] 76 ]
69 } 77 }
70 78
71 tool("asm") { 79 tool("asm") {
72 # 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.
73 depfile = "{{output}}.d" 81 depfile = "{{output}}.d"
74 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}}"
75 depsformat = "gcc" 83 depsformat = "gcc"
76 description = "ASM {{output}}" 84 description = "ASM {{output}}"
77 outputs = [ 85 outputs = [
78 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", 86 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
79 ] 87 ]
80 } 88 }
81 89
82 tool("objc") { 90 tool("objc") {
83 depfile = "{{output}}.d" 91 depfile = "{{output}}.d"
84 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
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}}"
85 depsformat = "gcc" 98 depsformat = "gcc"
86 description = "OBJC {{output}}" 99 description = "OBJC {{output}}"
87 outputs = [ 100 outputs = [
88 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", 101 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
89 ] 102 ]
90 } 103 }
91 104
92 tool("objcxx") { 105 tool("objcxx") {
93 depfile = "{{output}}.d" 106 depfile = "{{output}}.d"
94 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
109 # TODO:(andybons): enable this when GCC PCH support in the binary has been
110 # rolled.
111 #precompiled_header_type = "gcc"
95 depsformat = "gcc" 112 depsformat = "gcc"
96 description = "OBJCXX {{output}}" 113 description = "OBJCXX {{output}}"
97 outputs = [ 114 outputs = [
98 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o", 115 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.o",
99 ] 116 ]
100 } 117 }
101 118
102 tool("alink") { 119 tool("alink") {
103 command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -stat ic -o {{output}} {{inputs}}" 120 command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -stat ic -o {{output}} {{inputs}}"
104 description = "LIBTOOL-STATIC {{output}}" 121 description = "LIBTOOL-STATIC {{output}}"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 263 }
247 264
248 mac_toolchain("x64") { 265 mac_toolchain("x64") {
249 toolchain_cpu = "x64" 266 toolchain_cpu = "x64"
250 toolchain_os = "mac" 267 toolchain_os = "mac"
251 cc = "${goma_prefix}/gcc" 268 cc = "${goma_prefix}/gcc"
252 cxx = "${goma_prefix}/g++" 269 cxx = "${goma_prefix}/g++"
253 ld = cxx 270 ld = cxx
254 is_clang = false 271 is_clang = false
255 } 272 }
OLDNEW
« no previous file with comments | « build/config/BUILD.gn ('k') | tools/gn/config_values_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698