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

Side by Side Diff: build/toolchain/gcc_toolchain.gni

Issue 428013002: GN: Use rsp file, not rsp file contents, in solink line (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 # This template defines a toolchain for something that works like gcc 5 # This template defines a toolchain for something that works like gcc
6 # (including clang). 6 # (including clang).
7 # 7 #
8 # It requires the following variables specifying the executables to run: 8 # It requires the following variables specifying the executables to run:
9 # - cc 9 # - cc
10 # - cxx 10 # - cxx
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 rspfile = "\$out.rsp" 99 rspfile = "\$out.rsp"
100 rspfile_content = "\$in" 100 rspfile_content = "\$in"
101 } 101 }
102 tool("solink") { 102 tool("solink") {
103 rspfile = "\$out.rsp" 103 rspfile = "\$out.rsp"
104 rspfile_content = "-Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archiv e $solink_libs_section_prefix \$libs $solink_libs_section_postfix" 104 rspfile_content = "-Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archiv e $solink_libs_section_prefix \$libs $solink_libs_section_postfix"
105 105
106 # TODO(cjhopman): There needs to be a way for gn to correctly figure out 106 # TODO(cjhopman): There needs to be a way for gn to correctly figure out
107 # the outputs of a solink command. 107 # the outputs of a solink command.
108 108
109 link_command = "$ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname $rspfi le_content" 109 link_command = "$ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname @\$rsp file"
110 toc_command = "{ readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp" 110 toc_command = "{ readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp"
111 replace_command = "if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tm p \${lib}.TOC; fi" 111 replace_command = "if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tm p \${lib}.TOC; fi"
112 command = "$link_command && $toc_command && $replace_command" 112 command = "$link_command && $toc_command && $replace_command"
113 113
114 if (defined(invoker.postsolink)) { 114 if (defined(invoker.postsolink)) {
115 command += " && " + invoker.postsolink 115 command += " && " + invoker.postsolink
116 } 116 }
117 117
118 description = "SOLINK \$lib" 118 description = "SOLINK \$lib"
119 #pool = "link_pool" 119 #pool = "link_pool"
(...skipping 23 matching lines...) Expand all
143 if (defined(invoker.is_clang)) { 143 if (defined(invoker.is_clang)) {
144 is_clang = invoker.is_clang 144 is_clang = invoker.is_clang
145 } 145 }
146 } 146 }
147 147
148 if (defined(invoker.deps)) { 148 if (defined(invoker.deps)) {
149 deps = invoker.deps 149 deps = invoker.deps
150 } 150 }
151 } 151 }
152 } 152 }
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