xref: /aosp_15_r20/external/angle/build/config/nacl/host_toolchain.gni (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# Copyright 2022 The Chromium Authors
2*8975f5c5SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license that can be
3*8975f5c5SAndroid Build Coastguard Worker# found in the LICENSE file.
4*8975f5c5SAndroid Build Coastguard Worker
5*8975f5c5SAndroid Build Coastguard Workerdefault_nacl_bootstrap_compiler = "g++"
6*8975f5c5SAndroid Build Coastguard Workerif (default_toolchain == "//build/toolchain/cros:target") {
7*8975f5c5SAndroid Build Coastguard Worker  import("//build/toolchain/cros_toolchain.gni")
8*8975f5c5SAndroid Build Coastguard Worker  if (target_cpu == "arm64" && current_cpu == "arm") {
9*8975f5c5SAndroid Build Coastguard Worker    default_nacl_bootstrap_compiler = cros_nacl_helper_arm32_cxx
10*8975f5c5SAndroid Build Coastguard Worker  } else {
11*8975f5c5SAndroid Build Coastguard Worker    default_nacl_bootstrap_compiler = cros_target_cxx
12*8975f5c5SAndroid Build Coastguard Worker  }
13*8975f5c5SAndroid Build Coastguard Worker} else if (current_cpu == "arm" && !is_android) {
14*8975f5c5SAndroid Build Coastguard Worker  default_nacl_bootstrap_compiler = "arm-linux-gnueabihf-g++"
15*8975f5c5SAndroid Build Coastguard Worker} else if (current_cpu == "mipsel" && !is_android) {
16*8975f5c5SAndroid Build Coastguard Worker  default_nacl_bootstrap_compiler = "mipsel-linux-gnu-g++"
17*8975f5c5SAndroid Build Coastguard Worker}
18*8975f5c5SAndroid Build Coastguard Worker
19*8975f5c5SAndroid Build Coastguard Workerdeclare_args() {
20*8975f5c5SAndroid Build Coastguard Worker  # The compiler for the trusted nacl_helper_bootstrap binary.
21*8975f5c5SAndroid Build Coastguard Worker  nacl_bootstrap_compiler = default_nacl_bootstrap_compiler
22*8975f5c5SAndroid Build Coastguard Worker}
23