xref: /aosp_15_r20/external/angle/build/toolchain/fuchsia/BUILD.gn (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
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/toolchain/gcc_toolchain.gni")
6
7# Fuchsia builds using the Clang toolchain, with most parameters common across
8# the different target architectures.
9template("fuchsia_clang_toolchain") {
10  clang_toolchain(target_name) {
11    assert(host_os == "linux" || host_os == "mac")
12    assert(defined(invoker.toolchain_args),
13           "toolchain_args must be defined for fuchsia_clang_toolchain()")
14
15    # While we want use stripped binaries on the device, we need to retain the
16    # unstripped binaries in runtime_deps to make them available for the test
17    # isolates to enable symbolizing on bots.
18    strip = rebase_path("${clang_base_path}/bin/llvm-strip", root_build_dir)
19    use_unstripped_as_runtime_outputs = true
20
21    default_shlib_subdir = "/lib"
22
23    toolchain_args = invoker.toolchain_args
24    toolchain_args.current_os = "fuchsia"
25  }
26}
27
28fuchsia_clang_toolchain("x64") {
29  toolchain_args = {
30    current_cpu = "x64"
31  }
32}
33
34fuchsia_clang_toolchain("arm64") {
35  toolchain_args = {
36    current_cpu = "arm64"
37  }
38}
39