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

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

Issue 350743004: Allow dependencies of toolchains in GN. (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 | tools/gn/builder.h » ('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 (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 GCC toolchain. 5 # This template defines a GCC toolchain.
6 # 6 #
7 # It requires the following variables specifying the executables to run: 7 # It requires the following variables specifying the executables to run:
8 # - cc 8 # - cc
9 # - cxx 9 # - cxx
10 # - ar 10 # - ar
11 # - ld 11 # - ld
12 # and the following which is used in the toolchain_args 12 # and the following which is used in the toolchain_args
13 # - toolchain_cpu_arch (What "cpu_arch" should be set to when invoking a 13 # - toolchain_cpu_arch (What "cpu_arch" should be set to when invoking a
14 # build using this toolchain.) 14 # build using this toolchain.)
15 # - toolchain_os (What "os" should be set to when invoking a build using this 15 # - toolchain_os (What "os" should be set to when invoking a build using this
16 # toolchain.) 16 # toolchain.)
17 # 17 #
18 # Optional parameters: 18 # Optional parameters:
19 # - libs_section_prefix 19 # - libs_section_prefix
20 # - libs_section_postfix 20 # - libs_section_postfix
21 # The contents of these strings, if specified, will be placed around 21 # The contents of these strings, if specified, will be placed around
22 # the libs section of the linker line. It allows one to inject libraries 22 # the libs section of the linker line. It allows one to inject libraries
23 # at the beginning and end for all targets in a toolchain. 23 # at the beginning and end for all targets in a toolchain.
24 # - deps
25 # Just fowarded to the toolchain definition.
24 template("gcc_toolchain") { 26 template("gcc_toolchain") {
25 toolchain(target_name) { 27 toolchain(target_name) {
26 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") 28 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value")
27 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") 29 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value")
28 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") 30 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value")
29 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") 31 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value")
30 assert(defined(invoker.toolchain_cpu_arch), 32 assert(defined(invoker.toolchain_cpu_arch),
31 "gcc_toolchain() must specify a \"toolchain_cpu_arch\"") 33 "gcc_toolchain() must specify a \"toolchain_cpu_arch\"")
32 assert(defined(invoker.toolchain_os), 34 assert(defined(invoker.toolchain_os),
33 "gcc_toolchain() must specify a \"toolchain_os\"") 35 "gcc_toolchain() must specify a \"toolchain_os\"")
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ out)" 102 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ out)"
101 description = "COPY \$in \$out" 103 description = "COPY \$in \$out"
102 } 104 }
103 105
104 # When invoking this toolchain not as the default one, these args will be 106 # When invoking this toolchain not as the default one, these args will be
105 # passed to the build. They are ignored when this is the default toolchain. 107 # passed to the build. They are ignored when this is the default toolchain.
106 toolchain_args() { 108 toolchain_args() {
107 cpu_arch = invoker.toolchain_cpu_arch 109 cpu_arch = invoker.toolchain_cpu_arch
108 os = invoker.toolchain_os 110 os = invoker.toolchain_os
109 } 111 }
112
113 if (defined(invoker.deps)) {
114 deps = invoker.deps
115 }
110 } 116 }
111 } 117 }
OLDNEW
« no previous file with comments | « no previous file | tools/gn/builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698