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

Side by Side Diff: gn/BUILD.gn

Issue 2231833002: Roll GN: gn format is --in-place by default (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add a link pool Created 4 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
« no previous file with comments | « PRESUBMIT.py ('k') | 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 2016 Google Inc. 1 # Copyright 2016 Google Inc.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 declare_args() { 6 declare_args() {
7 ar = "ar" 7 ar = "ar"
8 cc = "cc" 8 cc = "cc"
9 cxx = "c++" 9 cxx = "c++"
10 } 10 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 config("executable") { 49 config("executable") {
50 if (is_mac) { 50 if (is_mac) {
51 ldflags = [ "-Wl,-rpath,@loader_path/." ] 51 ldflags = [ "-Wl,-rpath,@loader_path/." ]
52 } else if (is_linux) { 52 } else if (is_linux) {
53 ldflags = [ "-Wl,-rpath,\$ORIGIN" ] 53 ldflags = [ "-Wl,-rpath,\$ORIGIN" ]
54 } 54 }
55 } 55 }
56 56
57 pool("link_pool") {
58 depth = 0 #unlimited
59 }
60
57 toolchain("gcc_like") { 61 toolchain("gcc_like") {
58 lib_switch = "-l" 62 lib_switch = "-l"
59 lib_dir_switch = "-L" 63 lib_dir_switch = "-L"
60 64
61 tool("cc") { 65 tool("cc") {
62 depfile = "{{output}}.d" 66 depfile = "{{output}}.d"
63 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{c flags_c}} -c {{source}} -o {{output}}" 67 command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{c flags_c}} -c {{source}} -o {{output}}"
64 depsformat = "gcc" 68 depsformat = "gcc"
65 outputs = [ 69 outputs = [
66 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", 70 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 rpath = "-Wl,-install_name,@rpath/$soname" 110 rpath = "-Wl,-install_name,@rpath/$soname"
107 } 111 }
108 112
109 command = "$cxx -shared {{ldflags}} {{inputs}} {{solibs}} {{libs}} $rpath -o {{output}}" 113 command = "$cxx -shared {{ldflags}} {{inputs}} {{solibs}} {{libs}} $rpath -o {{output}}"
110 outputs = [ 114 outputs = [
111 "{{root_out_dir}}/$soname", 115 "{{root_out_dir}}/$soname",
112 ] 116 ]
113 output_prefix = "lib" 117 output_prefix = "lib"
114 default_output_extension = ".so" 118 default_output_extension = ".so"
115 description = "$cxx -shared ... -o {{output}}" 119 description = "$cxx -shared ... -o {{output}}"
120 pool = ":link_pool"
116 } 121 }
117 122
118 tool("link") { 123 tool("link") {
119 command = "$cxx {{ldflags}} {{inputs}} {{solibs}} {{libs}} -o {{output}}" 124 command = "$cxx {{ldflags}} {{inputs}} {{solibs}} {{libs}} -o {{output}}"
120 outputs = [ 125 outputs = [
121 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}", 126 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
122 ] 127 ]
123 description = "$cxx ... -o {{output}}" 128 description = "$cxx ... -o {{output}}"
129 pool = ":link_pool"
124 } 130 }
125 131
126 tool("stamp") { 132 tool("stamp") {
127 command = "touch {{output}}" 133 command = "touch {{output}}"
128 } 134 }
129 135
130 tool("copy") { 136 tool("copy") {
131 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" 137 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})"
132 } 138 }
133 } 139 }
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698