summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/webrtc/build/config/nacl/config.gni
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/webrtc/build/config/nacl/config.gni')
-rw-r--r--third_party/libwebrtc/webrtc/build/config/nacl/config.gni52
1 files changed, 52 insertions, 0 deletions
diff --git a/third_party/libwebrtc/webrtc/build/config/nacl/config.gni b/third_party/libwebrtc/webrtc/build/config/nacl/config.gni
new file mode 100644
index 0000000000..ad8936ed98
--- /dev/null
+++ b/third_party/libwebrtc/webrtc/build/config/nacl/config.gni
@@ -0,0 +1,52 @@
+# Copyright 2015 The Chromium 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/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
+ # is being used instead.
+ is_nacl_glibc = false
+}
+
+is_nacl_irt = false
+is_nacl_nonsfi = false
+
+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"
+ }
+
+ 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_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
+}