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

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

Issue 1312813003: add nacl_toolchain to //build and flip to using it in the GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@build_changes
Patch Set: rebase Created 5 years, 3 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
OLDNEW
(Empty)
1 # Copyright (c) 2014 The Native Client Authors. All rights reserved.
Dirk Pranke 2015/08/28 02:29:41 This file is copied over from //native_client/buil
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/toolchain/gcc_toolchain.gni")
6
7 # This template defines a NaCl toolchain.
8 #
9 # The template defines both a "raw" and "cooked" toolchain. These toolchains
brettw 2015/08/28 18:25:52 I don't understand this comment, I see only one to
Dirk Pranke 2015/08/28 20:08:32 I think this comment might be out of date. I will
Dirk Pranke 2015/08/28 20:37:07 Confirmed. Will clean it up.
10 # are identical, but use different names to allow us to inject dependencies
11 # without creating circular references.
12 #
13 # It requires the following variables specifying the executables to run:
14 # - cc
15 # - cxx
16 # - ar
17 # - ld
18 # and the following which is used in the toolchain_args
19 # - toolchain_cpu (What "current_cpu" should be set to when invoking a
20 # build using this toolchain.)
21
22 template("nacl_toolchain") {
23 assert(defined(invoker.cc), "nacl_toolchain() must specify a \"cc\" value")
24 assert(defined(invoker.cxx), "nacl_toolchain() must specify a \"cxx\" value")
25 assert(defined(invoker.ar), "nacl_toolchain() must specify a \"ar\" value")
26 assert(defined(invoker.ld), "nacl_toolchain() must specify a \"ld\" value")
27 assert(defined(invoker.toolchain_cpu),
28 "nacl_toolchain() must specify a \"toolchain_cpu\"")
29
30 toolchain_os = "nacl"
31 if (defined(invoker.is_clang)) {
Roland McGrath 2015/08/28 20:58:40 Use forward_variables_from for this, postlink, and
Dirk Pranke 2015/08/28 21:17:05 Ack. I debated whether to change that or not as pa
32 is_clang = invoker.is_clang
33 }
34 if (defined(invoker.executable_extension)) {
35 executable_extension = invoker.executable_extension
36 } else {
37 executable_extension = ".nexe"
38 }
39 toolchain_cpu = invoker.toolchain_cpu
40
41 cc = invoker.cc
42 cxx = invoker.cxx
43 ar = invoker.ar
44 ld = invoker.ld
45 if (defined(invoker.postlink)) {
46 postlink = invoker.postlink
47 }
48 if (defined(invoker.link_outputs)) {
49 link_outputs = invoker.link_outputs
50 }
51
52 # NaCl toolchains do not support shared libraries and so they don't support
Roland McGrath 2015/08/28 20:58:40 NaCl glibc toolchains do support shared libraries.
Dirk Pranke 2015/08/28 21:17:05 I see. I have a vague memory of ncbray telling me
Roland McGrath 2015/08/28 22:35:57 ncbray disclaims all knowledge of this particular
53 # component_mode builds.
54 is_component_build = false
55
56 gcc_toolchain(target_name) {
57 rebuild_define = "NACL_TC_REV=" + invoker.toolchain_revision
58 if (defined(invoker.deps)) {
59 deps = invoker.deps
60 }
61 }
62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698