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

Unified Diff: build/config/nacl/config.gni

Issue 1517203002: Fix nacl_tuple "Undefined identifier" gn gen failure for arm64 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enable_nacl Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/nacl/config.gni
diff --git a/build/config/nacl/config.gni b/build/config/nacl/config.gni
index 6abd8aa4e86466ff2211aa1457657a1d634f9b1d..ad8936ed9859e01b39bddb811e6583d22488d9c6 100644
--- a/build/config/nacl/config.gni
+++ b/build/config/nacl/config.gni
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/features.gni")
+
declare_args() {
# Native Client supports both Newlib and Glibc C libraries where Newlib
# is assumed to be the default one; use this to determine whether Glibc
@@ -9,37 +11,42 @@ declare_args() {
is_nacl_glibc = false
}
-nacl_toolchain_dir = "//native_client/toolchain/${host_os}_x86"
+is_nacl_irt = false
+is_nacl_nonsfi = false
-if (is_nacl_glibc) {
- if (current_cpu == "x86" || current_cpu == "x64") {
- nacl_toolchain_package = "nacl_x86_glibc"
- } else if (current_cpu == "arm") {
- nacl_toolchain_package = "nacl_arm_glibc"
+if (enable_nacl) {
+ nacl_toolchain_dir = "//native_client/toolchain/${host_os}_x86"
+
+ if (is_nacl_glibc) {
+ if (current_cpu == "x86" || current_cpu == "x64") {
+ nacl_toolchain_package = "nacl_x86_glibc"
+ } else if (current_cpu == "arm") {
+ nacl_toolchain_package = "nacl_arm_glibc"
+ }
+ } else {
+ nacl_toolchain_package = "pnacl_newlib"
}
-} else {
- nacl_toolchain_package = "pnacl_newlib"
-}
-if (current_cpu == "pnacl") {
- nacl_tuple = "pnacl"
-} else if (current_cpu == "x86" || current_cpu == "x64") {
- nacl_tuple = "x86_64-nacl"
-} else if (current_cpu == "arm") {
- nacl_tuple = "arm-nacl"
-} else if (current_cpu == "mipsel") {
- nacl_tuple = "mipsel-nacl"
-}
+ if (current_cpu == "pnacl") {
+ _nacl_tuple = "pnacl"
+ } else if (current_cpu == "x86" || current_cpu == "x64") {
+ _nacl_tuple = "x86_64-nacl"
+ } else if (current_cpu == "arm") {
+ _nacl_tuple = "arm-nacl"
+ } else if (current_cpu == "mipsel") {
+ _nacl_tuple = "mipsel-nacl"
+ }
-nacl_toolchain_bindir = "${nacl_toolchain_dir}/${nacl_toolchain_package}/bin"
-nacl_toolchain_tooldir =
- "${nacl_toolchain_dir}/${nacl_toolchain_package}/${nacl_tuple}"
-nacl_toolprefix = "${nacl_toolchain_bindir}/${nacl_tuple}-"
+ nacl_toolchain_bindir = "${nacl_toolchain_dir}/${nacl_toolchain_package}/bin"
+ nacl_toolchain_tooldir =
+ "${nacl_toolchain_dir}/${nacl_toolchain_package}/${_nacl_tuple}"
+ nacl_toolprefix = "${nacl_toolchain_bindir}/${_nacl_tuple}-"
-nacl_irt_toolchain = "//build/toolchain/nacl:irt_" + target_cpu
-is_nacl_irt = current_toolchain == nacl_irt_toolchain
+ nacl_irt_toolchain = "//build/toolchain/nacl:irt_" + target_cpu
+ is_nacl_irt = current_toolchain == nacl_irt_toolchain
-# Non-SFI mode is a lightweight sandbox used by Chrome OS for running ARC
-# applications.
-nacl_nonsfi_toolchain = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
-is_nacl_nonsfi = current_toolchain == nacl_nonsfi_toolchain
+ # Non-SFI mode is a lightweight sandbox used by Chrome OS for running ARC
+ # applications.
+ nacl_nonsfi_toolchain = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
+ is_nacl_nonsfi = current_toolchain == nacl_nonsfi_toolchain
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698