| # Copyright 2016 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| default_clang_prefix = rebase_path("//sysroot/bin", root_build_dir) |
| |
| declare_args() { |
| # The default clang toolchain provided by the sysroot. This variable is |
| # additionally consumed by the Go toolchain. |
| clang_prefix = default_clang_prefix |
| } |
| |
| if (current_cpu == "arm64") { |
| clang_cpu = "aarch64" |
| } else if (current_cpu == "x64") { |
| clang_cpu = "x86_64" |
| } else { |
| assert(false, "CPU not supported") |
| } |
| |
| if (is_fuchsia) { |
| clang_target = "${clang_cpu}-fuchsia" |
| } else if (is_linux) { |
| clang_target = "${clang_cpu}-linux-gnu" |
| } else if (is_mac) { |
| clang_target = "${clang_cpu}-apple-darwin" |
| } else { |
| assert(false, "OS not supported") |
| } |