| # 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. |
| |
| import("//build/config/clang/clang_cpu.gni") |
| import("//build/config/current_target_tuple.gni") |
| |
| default_clang_prefix = "//prebuilt/third_party/clang/${host_platform}/bin" |
| |
| declare_args() { |
| # The default clang toolchain provided by the prebuilt. This variable is |
| # additionally consumed by the Go toolchain. |
| clang_prefix = default_clang_prefix |
| |
| # Embed LLVM bitcode as .llvmbc section in ELF files. This is intended |
| # primarily for external tools that use bitcode for analysis. |
| clang_embed_bitcode = false |
| |
| # Enable reproducers on error. This provides crash-like reproducers on |
| # compiler errors in addition to crashes. |
| # Note, this flag should be used by very few people at the moment |
| # because it depends on features that are not yet in prebuilt clang. |
| # It is only useful for clang canary builders, and folks with a custom |
| # clang. |
| clang_enable_error_reproducers = false |
| |
| # Controls whether to use the ML inliner in Clang to reduce size. |
| clang_ml_inliner = true |
| } |
| |
| # The value of clang_prefix relative to root_build_dir, useful |
| # when expanding it in command arguments. |
| rebased_clang_prefix = rebase_path(clang_prefix, root_build_dir) |
| |
| # TODO(https://fxbug.dev/42082246): Enable clang_ml_inliner when |
| # the mac-arm64 toolchain supports it. |
| if (host_platform == "mac-arm64") { |
| clang_ml_inliner = false |
| } |