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

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

Issue 304293003: Use response files in the GN build for shared libs and executables (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 depfile = "\$out.d" 73 depfile = "\$out.d"
74 deps = "gcc" 74 deps = "gcc"
75 } 75 }
76 tool("objcxx") { 76 tool("objcxx") {
77 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \$cflags_objcc \$cflags_pch_objcc -c \$in -o \$out" 77 command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \$cflags_objcc \$cflags_pch_objcc -c \$in -o \$out"
78 description = "OBJCXX \$out" 78 description = "OBJCXX \$out"
79 depfile = "\$out.d" 79 depfile = "\$out.d"
80 deps = "gcc" 80 deps = "gcc"
81 } 81 }
82 tool("alink") { 82 tool("alink") {
83 command = "rm -f \$out && ./gyp-mac-tool filter-libtool libtool \$libtool_ flags -static -o \$out \$in \$postbuilds" 83 command = "rm -f \$out && ./gyp-mac-tool filter-libtool libtool \$libtool_ flags -static -o \$out @\$rspfile \$postbuilds"
84 description = "LIBTOOL-STATIC \$out, POSTBUILDS" 84 description = "LIBTOOL-STATIC \$out"
Nico 2014/05/30 16:37:24 postbuilds usually take most of the time, so omitt
brettw 2014/05/30 17:24:39 We don't do any postbuilds. Anything that's requir
Nico 2014/05/30 17:35:38 That's a good point :-)
85 rspfile = "\$out.rsp"
Nico 2014/05/30 16:37:24 Oh, I suppose my comment about spaces is more appr
86 rspfile_content = "\$in"
85 } 87 }
86 tool("solink") { 88 tool("solink") {
87 command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1 -2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflags -o \ $lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi" 89 command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib @\$rspfile \$solibs \ $libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | c ut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflag s -o \$lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DY LIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi "
88 description = "SOLINK \$lib, POSTBUILDS" 90 description = "SOLINK \$lib"
91 rspfile = "\$out.rsp"
92 rspfile_content = "\$in"
89 #pool = "link_pool" 93 #pool = "link_pool"
90 restat = "1" 94 restat = "1"
91 } 95 }
92 tool("link") { 96 tool("link") {
93 command = "$ld \$ldflags -o \$out \$in \$solibs \$libs \$postbuilds" 97 command = "$ld \$ldflags -o \$out @\$rspfile \$solibs \$libs \$postbuilds"
94 description = "LINK \$out, POSTBUILDS" 98 description = "LINK \$out"
99 rspfile = "\$out.rsp"
100 rspfile_content = "\$in"
95 #pool = "link_pool" 101 #pool = "link_pool"
96 } 102 }
97 #tool("infoplist") { 103 #tool("infoplist") {
98 # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && pluti l -convert xml1 \$out \$out" 104 # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && pluti l -convert xml1 \$out \$out"
99 # description = "INFOPLIST \$out" 105 # description = "INFOPLIST \$out"
100 #} 106 #}
101 #tool("mac_tool") { 107 #tool("mac_tool") {
102 # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out" 108 # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out"
103 # description = "MACTOOL \$mactool_cmd \$in" 109 # description = "MACTOOL \$mactool_cmd \$in"
104 #} 110 #}
(...skipping 19 matching lines...) Expand all
124 # Toolchain representing the target build (either mac or iOS). 130 # Toolchain representing the target build (either mac or iOS).
125 mac_clang_toolchain("clang") { 131 mac_clang_toolchain("clang") {
126 toolchain_os = os 132 toolchain_os = os
127 } 133 }
128 134
129 # This toolchain provides a way for iOS target compiles to reference targets 135 # This toolchain provides a way for iOS target compiles to reference targets
130 # compiled for the host system. It just overrides the OS back to "mac". 136 # compiled for the host system. It just overrides the OS back to "mac".
131 mac_clang_toolchain("host_clang") { 137 mac_clang_toolchain("host_clang") {
132 toolchain_os = "mac" 138 toolchain_os = "mac"
133 } 139 }
OLDNEW
« build/toolchain/gcc_toolchain.gni ('K') | « build/toolchain/gcc_toolchain.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698