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

Side by Side Diff: tools/gn/example/build/toolchain/BUILD.gn

Issue 774353003: gn format // (the rest) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase net Created 6 years 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 | « tools/gn/example/build/BUILDCONFIG.gn ('k') | tools/json_schema_compiler/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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 toolchain("gcc") { 5 toolchain("gcc") {
6 tool("cc") { 6 tool("cc") {
7 depfile = "{{output}}.d" 7 depfile = "{{output}}.d"
8 command = "gcc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{c flags_c}} -c {{source}} -o {{output}}" 8 command = "gcc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{c flags_c}} -c {{source}} -o {{output}}"
9 depsformat = "gcc" 9 depsformat = "gcc"
10 description = "CC {{output}}" 10 description = "CC {{output}}"
(...skipping 11 matching lines...) Expand all
22 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", 22 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
23 ] 23 ]
24 } 24 }
25 25
26 tool("alink") { 26 tool("alink") {
27 rspfile = "{{output}}.rsp" 27 rspfile = "{{output}}.rsp"
28 command = "rm -f {{output}} && ar rcs {{output}} @$rspfile" 28 command = "rm -f {{output}} && ar rcs {{output}} @$rspfile"
29 description = "AR {{target_output_name}}{{output_extension}}" 29 description = "AR {{target_output_name}}{{output_extension}}"
30 rspfile_content = "{{inputs}}" 30 rspfile_content = "{{inputs}}"
31 outputs = [ 31 outputs = [
32 "{{target_out_dir}}/{{target_output_name}}{{output_extension}}" 32 "{{target_out_dir}}/{{target_output_name}}{{output_extension}}",
33 ] 33 ]
34 default_output_extension = ".a" 34 default_output_extension = ".a"
35 output_prefix = "lib" 35 output_prefix = "lib"
36 } 36 }
37 37
38 tool("solink") { 38 tool("solink") {
39 soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so". 39 soname = "{{target_output_name}}{{output_extension}}" # e.g. "libfoo.so".
40 rspfile = soname + ".rsp" 40 rspfile = soname + ".rsp"
41 41
42 command = "g++ -shared {{ldflags}} -o $soname -Wl,-soname=$soname @$rspfile" 42 command = "g++ -shared {{ldflags}} -o $soname -Wl,-soname=$soname @$rspfile"
(...skipping 13 matching lines...) Expand all
56 depend_output = soname 56 depend_output = soname
57 output_prefix = "lib" 57 output_prefix = "lib"
58 } 58 }
59 59
60 tool("link") { 60 tool("link") {
61 outfile = "{{target_output_name}}{{output_extension}}" 61 outfile = "{{target_output_name}}{{output_extension}}"
62 rspfile = "$outfile.rsp" 62 rspfile = "$outfile.rsp"
63 command = "g++ {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs} } -Wl,--end-group {{libs}}" 63 command = "g++ {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs} } -Wl,--end-group {{libs}}"
64 description = "LINK $outfile" 64 description = "LINK $outfile"
65 rspfile_content = "{{inputs}}" 65 rspfile_content = "{{inputs}}"
66 outputs = [ outfile ] 66 outputs = [
67 outfile,
68 ]
67 } 69 }
68 70
69 tool("stamp") { 71 tool("stamp") {
70 command = "touch {{output}}" 72 command = "touch {{output}}"
71 description = "STAMP {{output}}" 73 description = "STAMP {{output}}"
72 } 74 }
73 75
74 tool("copy") { 76 tool("copy") {
75 command = "cp -af {{source}} {{output}}" 77 command = "cp -af {{source}} {{output}}"
76 description = "COPY {{source}} {{output}}" 78 description = "COPY {{source}} {{output}}"
77 } 79 }
78 } 80 }
OLDNEW
« no previous file with comments | « tools/gn/example/build/BUILDCONFIG.gn ('k') | tools/json_schema_compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698