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

Unified Diff: build/toolchain/nacl/BUILD.gn

Issue 1366443002: GN: Define clang_newlib_arm toolchain for NaCl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/nacl/BUILD.gn
diff --git a/build/toolchain/nacl/BUILD.gn b/build/toolchain/nacl/BUILD.gn
index 6ff9a31c02e5069eba62d165a0a6ea8efa0dae84..5e7e39124e232fac9f7507347f9c8a67552982c9 100644
--- a/build/toolchain/nacl/BUILD.gn
+++ b/build/toolchain/nacl/BUILD.gn
@@ -70,30 +70,22 @@ nacl_toolchain("glibc_x64") {
ld = cxx
}
-nacl_toolchain("clang_newlib_x86") {
- toolchain_package = "pnacl_newlib"
- toolchain_revision = pnacl_newlib_rev
- toolchain_cpu = "x86"
- toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/i686-nacl-"
- is_clang = true
-
- cc = toolprefix + "clang"
- cxx = toolprefix + "clang++"
- ar = toolprefix + "ar"
- ld = cxx
-}
+template("nacl_clang_toolchain") {
+ toolchain_cpu = target_name
+ assert(defined(invoker.toolchain_tuple), "Must define toolchain_tuple")
-nacl_toolchain("clang_newlib_x64") {
toolchain_package = "pnacl_newlib"
toolchain_revision = pnacl_newlib_rev
- toolchain_cpu = "x64"
- toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/x86_64-nacl-"
- is_clang = true
+ toolprefix = "${os_toolchain_dir}/${toolchain_package}/bin/" +
+ invoker.toolchain_tuple + "-"
- cc = toolprefix + "clang"
- cxx = toolprefix + "clang++"
- ar = toolprefix + "ar"
- ld = cxx
+ nacl_toolchain("clang_newlib_" + toolchain_cpu) {
+ is_clang = true
+ cc = toolprefix + "clang"
+ cxx = toolprefix + "clang++"
+ ar = toolprefix + "ar"
+ ld = cxx
+ }
}
template("nacl_irt_toolchain") {
@@ -132,14 +124,24 @@ template("nacl_irt_toolchain") {
}
}
-nacl_irt_toolchain("x86") {
+template("nacl_clang_toolchains") {
+ assert(defined(invoker.toolchain_tuple), "Must define toolchain_tuple")
+ nacl_clang_toolchain(target_name) {
+ toolchain_tuple = invoker.toolchain_tuple
+ }
+ nacl_irt_toolchain(target_name) {
+ toolchain_tuple = invoker.toolchain_tuple
+ }
+}
+
+nacl_clang_toolchains("x86") {
toolchain_tuple = "i686-nacl"
}
-nacl_irt_toolchain("x64") {
+nacl_clang_toolchains("x64") {
toolchain_tuple = "x86_64-nacl"
}
-nacl_irt_toolchain("arm") {
+nacl_clang_toolchains("arm") {
toolchain_tuple = "arm-nacl"
}
« no previous file with comments | « no previous file | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698