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

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

Issue 340233002: GN: Use -Wl,-filelist for rsp files on mac instead of @ (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
« no previous file with comments | « no previous file | no next file » | 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 \$in \$postbuilds"
84 description = "LIBTOOL-STATIC \$out" 84 description = "LIBTOOL-STATIC \$out"
85 } 85 }
86 tool("solink") { 86 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 @\$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 " 87 command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib -Wl,-filelist,\$rspfi le \$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 -sh ared \$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"
88 description = "SOLINK \$lib" 88 description = "SOLINK \$lib"
89 rspfile = "\$out.rsp" 89 rspfile = "\$out.rsp"
90 rspfile_content = "\$in" 90 rspfile_content = "\$in_newline"
91 #pool = "link_pool" 91 #pool = "link_pool"
92 restat = "1" 92 restat = "1"
93 } 93 }
94 tool("link") { 94 tool("link") {
95 command = "$ld \$ldflags -o \$out @\$rspfile \$solibs \$libs \$postbuilds" 95 command = "$ld \$ldflags -o \$out -Wl,-filelist,\$rspfile \$solibs \$libs \$postbuilds"
96 description = "LINK \$out" 96 description = "LINK \$out"
97 rspfile = "\$out.rsp" 97 rspfile = "\$out.rsp"
98 rspfile_content = "\$in" 98 rspfile_content = "\$in_newline"
99 #pool = "link_pool" 99 #pool = "link_pool"
100 } 100 }
101 #tool("infoplist") { 101 #tool("infoplist") {
102 # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && pluti l -convert xml1 \$out \$out" 102 # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && pluti l -convert xml1 \$out \$out"
103 # description = "INFOPLIST \$out" 103 # description = "INFOPLIST \$out"
104 #} 104 #}
105 #tool("mac_tool") { 105 #tool("mac_tool") {
106 # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out" 106 # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out"
107 # description = "MACTOOL \$mactool_cmd \$in" 107 # description = "MACTOOL \$mactool_cmd \$in"
108 #} 108 #}
(...skipping 19 matching lines...) Expand all
128 # Toolchain representing the target build (either mac or iOS). 128 # Toolchain representing the target build (either mac or iOS).
129 mac_clang_toolchain("clang") { 129 mac_clang_toolchain("clang") {
130 toolchain_os = os 130 toolchain_os = os
131 } 131 }
132 132
133 # This toolchain provides a way for iOS target compiles to reference targets 133 # This toolchain provides a way for iOS target compiles to reference targets
134 # compiled for the host system. It just overrides the OS back to "mac". 134 # compiled for the host system. It just overrides the OS back to "mac".
135 mac_clang_toolchain("host_clang") { 135 mac_clang_toolchain("host_clang") {
136 toolchain_os = "mac" 136 toolchain_os = "mac"
137 } 137 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698