1 # Copyright (c) 2014 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/nacl/config.gni")
6 import("//build/toolchain/gcc_toolchain.gni")
8 # This template defines a NaCl toolchain.
10 # It requires the following variables specifying the executables to run:
16 template("nacl_toolchain") {
17 assert(defined(invoker.cc), "nacl_toolchain() must specify a \"cc\" value")
18 assert(defined(invoker.cxx), "nacl_toolchain() must specify a \"cxx\" value")
19 assert(defined(invoker.ar), "nacl_toolchain() must specify a \"ar\" value")
20 assert(defined(invoker.ld), "nacl_toolchain() must specify a \"ld\" value")
21 gcc_toolchain(target_name) {
22 if (defined(invoker.executable_extension)) {
23 executable_extension = invoker.executable_extension
25 executable_extension = ".nexe"
27 rebuild_define = "NACL_TC_REV=" + invoker.toolchain_revision
29 forward_variables_from(invoker,
44 # Use all values set on the invoker's toolchain_args.
45 forward_variables_from(invoker.toolchain_args, "*")
49 # We do not support component builds with the NaCl toolchains.
50 is_component_build = false
52 # We do not support clang profiling in the NaCl toolchains.
53 use_clang_profiling = false
54 use_clang_coverage = false
55 coverage_instrumentation_input_file = ""
59 rbe_cc_cfg_file = rebase_path(rbe_cfg_dir, root_build_dir) +
60 "/nacl/rewrapper_windows.cfg"
62 rbe_cc_cfg_file = rebase_path(rbe_cfg_dir, root_build_dir) +
63 "/nacl/rewrapper_mac.cfg"
65 # TODO(ukai): non linux?
66 rbe_cc_cfg_file = rebase_path(rbe_cfg_dir, root_build_dir) +
67 "/nacl/rewrapper_linux.cfg"
71 if (use_remoteexec_links) {
72 rbe_link_cfg_file = rebase_path(rbe_cfg_dir, root_build_dir) +
73 "/nacl/rewrapper_linux_link.cfg"
76 # TODO(b/282032209): Re-enable remote nacl links once mismatches due to
77 # linking with absolute paths has been fixed.
78 use_remoteexec_links = false