• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/cast.gni")
6import("//build/config/gclient_args.gni")
7
8# The NaCl sandbox and toolchain currently only support x86-32, x86-64
9# and ARM32.
10#
11# The NaCl sandbox itself supports MIPS32, but the Clang toolchain
12# support for that is no longer up-to-date, so we don't include that
13# in the list of CPU architectures to enable NaCl on.
14#
15# NaCl is also supported on ARM64 Chrome OS, where the ARM32 NaCl
16# sandbox is used.
17# NaCl works on non-Chrome-OS ARM64 Linux, but we don't enable it by default in
18# that case.
19_cpu_is_supported =
20    target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" ||
21    (target_cpu == "arm64" && target_os == "chromeos")
22
23declare_args() {
24  # Enables Native Client support.
25  #
26  # NaCl is only supported on ChromeOS.
27  enable_nacl = checkout_nacl && _cpu_is_supported && target_os == "chromeos"
28}
29
30assert(!enable_nacl || checkout_nacl)
31