summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/build/toolchain/nacl_toolchain.gni
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/libwebrtc/build/toolchain/nacl_toolchain.gni
parentInitial commit. (diff)
downloadthunderbird-upstream.tar.xz
thunderbird-upstream.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/build/toolchain/nacl_toolchain.gni')
-rw-r--r--third_party/libwebrtc/build/toolchain/nacl_toolchain.gni73
1 files changed, 73 insertions, 0 deletions
diff --git a/third_party/libwebrtc/build/toolchain/nacl_toolchain.gni b/third_party/libwebrtc/build/toolchain/nacl_toolchain.gni
new file mode 100644
index 0000000000..25fbd6405b
--- /dev/null
+++ b/third_party/libwebrtc/build/toolchain/nacl_toolchain.gni
@@ -0,0 +1,73 @@
+# 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
+
+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")
+ gcc_toolchain(target_name) {
+ if (defined(invoker.executable_extension)) {
+ executable_extension = invoker.executable_extension
+ } else {
+ executable_extension = ".nexe"
+ }
+ rebuild_define = "NACL_TC_REV=" + invoker.toolchain_revision
+
+ forward_variables_from(invoker,
+ [
+ "ar",
+ "cc",
+ "cxx",
+ "deps",
+ "ld",
+ "link_outputs",
+ "nm",
+ "readelf",
+ "strip",
+ "extra_cppflags",
+ ])
+
+ toolchain_args = {
+ # Use all values set on the invoker's toolchain_args.
+ forward_variables_from(invoker.toolchain_args, "*")
+
+ current_os = "nacl"
+
+ # 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"
+ use_allocator_shim = false
+
+ # We do not support clang profiling in the NaCl toolchains.
+ use_clang_profiling = false
+ use_clang_coverage = false
+ coverage_instrumentation_input_file = ""
+
+ if (use_remoteexec) {
+ if (is_win) {
+ rbe_cc_cfg_file = "${rbe_cfg_dir}/nacl/rewrapper_windows.cfg"
+ } else if (is_mac) {
+ rbe_cc_cfg_file = "${rbe_cfg_dir}/nacl/rewrapper_mac.cfg"
+ } else {
+ # TODO(ukai): non linux?
+ rbe_cc_cfg_file = "${rbe_cfg_dir}/nacl/rewrapper_linux.cfg"
+ }
+ }
+ }
+ }
+}