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

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

Issue 502163002: Fix GN toolchains to use proper out dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/toolchain/gcc_toolchain.gni ('k') | build/toolchain/win/BUILD.gn » ('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 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -stat ic -o {{output}} {{inputs}}" 110 command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -stat ic -o {{output}} {{inputs}}"
111 description = "LIBTOOL-STATIC {{output}}" 111 description = "LIBTOOL-STATIC {{output}}"
112 outputs = [ 112 outputs = [
113 "{{target_out_dir}}/{{target_output_name}}{{output_extension}}" 113 "{{target_out_dir}}/{{target_output_name}}{{output_extension}}"
114 ] 114 ]
115 default_output_extension = ".a" 115 default_output_extension = ".a"
116 output_prefix = "lib" 116 output_prefix = "lib"
117 } 117 }
118 118
119 tool("solink") { 119 tool("solink") {
120 dylib = "{{target_output_name}}{{output_extension}}" # eg "libfoo.dylib" 120 dylib = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" # e g "./libfoo.dylib"
121 rspfile = dylib + ".rsp" 121 rspfile = dylib + ".rsp"
122 122
123 # These variables are not build into GN but are helpers that implement 123 # These variables are not build into GN but are helpers that implement
124 # (1) linking to produce a .so, (2) extracting the symbols from that file 124 # (1) linking to produce a .so, (2) extracting the symbols from that file
125 # to a temporary file, (3) if the temporary file has differences from the 125 # to a temporary file, (3) if the temporary file has differences from the
126 # existing .TOC file, overwrite it, oterwise, don't change it. 126 # existing .TOC file, overwrite it, oterwise, don't change it.
127 # 127 #
128 # As a special case, if the library reexports symbols from other dynamic 128 # As a special case, if the library reexports symbols from other dynamic
129 # libraries, we always update the .TOC and skip the temporary file and 129 # libraries, we always update the .TOC and skip the temporary file and
130 # diffing steps, since that library always needs to be re-linked. 130 # diffing steps, since that library always needs to be re-linked.
(...skipping 27 matching lines...) Expand all
158 # tocname for dependency management. 158 # tocname for dependency management.
159 outputs = [ 159 outputs = [
160 dylib, 160 dylib,
161 tocname, 161 tocname,
162 ] 162 ]
163 link_output = dylib 163 link_output = dylib
164 depend_output = tocname 164 depend_output = tocname
165 } 165 }
166 166
167 tool("link") { 167 tool("link") {
168 outfile = "{{target_output_name}}{{output_extension}}" 168 outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}"
169 rspfile = "$outfile.rsp" 169 rspfile = "$outfile.rsp"
170 command = "$ld {{ldflags}} -o $outfile -Wl,-filelist,$rspfile {{solibs}} { {libs}}" 170 command = "$ld {{ldflags}} -o $outfile -Wl,-filelist,$rspfile {{solibs}} { {libs}}"
171 description = "LINK $outfile" 171 description = "LINK $outfile"
172 rspfile_content = "{{inputs_newline}}" 172 rspfile_content = "{{inputs_newline}}"
173 outputs = [ outfile ] 173 outputs = [ outfile ]
174 } 174 }
175 175
176 tool("stamp") { 176 tool("stamp") {
177 command = "touch {{output}}" 177 command = "touch {{output}}"
178 description = "STAMP {{output}}" 178 description = "STAMP {{output}}"
(...skipping 13 matching lines...) Expand all
192 # Toolchain representing the target build (either mac or iOS). 192 # Toolchain representing the target build (either mac or iOS).
193 mac_clang_toolchain("clang") { 193 mac_clang_toolchain("clang") {
194 toolchain_os = os 194 toolchain_os = os
195 } 195 }
196 196
197 # This toolchain provides a way for iOS target compiles to reference targets 197 # This toolchain provides a way for iOS target compiles to reference targets
198 # compiled for the host system. It just overrides the OS back to "mac". 198 # compiled for the host system. It just overrides the OS back to "mac".
199 mac_clang_toolchain("host_clang") { 199 mac_clang_toolchain("host_clang") {
200 toolchain_os = "mac" 200 toolchain_os = "mac"
201 } 201 }
OLDNEW
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | build/toolchain/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698