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

Unified Diff: build/toolchain/nacl_toolchain.gni

Issue 2023703002: Beginning work on GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Really add //build. Add dart_bootstrap rule. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/toolchain/nacl/BUILD.gn ('k') | build/toolchain/toolchain.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/nacl_toolchain.gni
diff --git a/build/toolchain/nacl_toolchain.gni b/build/toolchain/nacl_toolchain.gni
new file mode 100644
index 0000000000000000000000000000000000000000..ea4c5ec69e77bd2cb61392b6c5a066fe96fce8dc
--- /dev/null
+++ b/build/toolchain/nacl_toolchain.gni
@@ -0,0 +1,67 @@
+# Copyright (c) 2014 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/nacl/config.gni")
+import("//build/toolchain/gcc_toolchain.gni")
+
+# This template defines a NaCl toolchain.
+#
+# It requires the following variables specifying the executables to run:
+# - cc
+# - cxx
+# - ar
+# - ld
+# and the following which is used in the toolchain_args
+# - toolchain_cpu (What "current_cpu" should be set to when invoking a
+# build using this toolchain.)
+
+template("nacl_toolchain") {
+ assert(defined(invoker.cc), "nacl_toolchain() must specify a \"cc\" value")
+ assert(defined(invoker.cxx), "nacl_toolchain() must specify a \"cxx\" value")
+ assert(defined(invoker.ar), "nacl_toolchain() must specify a \"ar\" value")
+ assert(defined(invoker.ld), "nacl_toolchain() must specify a \"ld\" value")
+ assert(defined(invoker.toolchain_cpu),
+ "nacl_toolchain() must specify a \"toolchain_cpu\"")
+ gcc_toolchain(target_name) {
+ toolchain_os = "nacl"
+
+ if (defined(invoker.executable_extension)) {
+ executable_extension = invoker.executable_extension
+ } else {
+ executable_extension = ".nexe"
+ }
+
+ forward_variables_from(invoker,
+ [
+ "ar",
+ "cc",
+ "cxx",
+ "deps",
+ "ld",
+ "link_outputs",
+ "nm",
+ "readelf",
+ "strip",
+ "toolchain_cpu",
+ ])
+
+ if (defined(invoker.is_clang)) {
+ is_clang = invoker.is_clang
+ }
+ if (defined(invoker.is_nacl_glibc)) {
+ is_nacl_glibc = invoker.is_nacl_glibc
+ }
+ if (defined(invoker.symbol_level)) {
+ symbol_level = invoker.symbol_level
+ }
+
+ # We do not support component builds with the NaCl toolchains.
+ is_component_build = false
+
+ # We do not support tcmalloc in the NaCl toolchains.
+ use_allocator = "none"
+
+ rebuild_define = "NACL_TC_REV=" + invoker.toolchain_revision
+ }
+}
« no previous file with comments | « build/toolchain/nacl/BUILD.gn ('k') | build/toolchain/toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698