blob: 11d3551ebcc5f643686304a76bb6a67f8815090d [file] [log] [blame]
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
import("//build/toolchain/toolchain.gni")
default_clang_base_path = "//third_party/llvm-build/Release+Asserts"
declare_args() {
# Indicates if the build should use the Chrome-specific plugins for enforcing
# coding guidelines, etc. Only used when compiling with Chrome's Clang, not
# Chrome OS's.
clang_use_chrome_plugins =
is_clang && !is_nacl && current_os != "zos" &&
default_toolchain != "//build/toolchain/cros:target"
enable_check_raw_ptr_fields =
build_with_chromium && !is_official_build &&
((is_linux && !is_castos) || (is_android && !is_cast_android) || is_mac ||
is_win || is_chromeos_lacros || is_chromeos_ash)
# TODO(crbug.com/40268473): Merge with enable_check_raw_ptr_fields once both
# checks are activated on the same set of platforms.
enable_check_raw_ref_fields =
build_with_chromium && !is_official_build &&
((is_linux && !is_castos) || (is_android && !is_cast_android) || is_win ||
is_mac || is_chromeos_lacros || is_chromeos_ash)
clang_base_path = default_clang_base_path
# Specifies whether or not bitcode should be embedded during compilation.
# This is used for creating a MLGO corpus from Chromium in the non-ThinLTO case.
clang_embed_bitcode = false
# Set to true to enable output of ThinLTO index and import files used for
# creating a Chromium MLGO corpus in the ThinLTO case.
lld_emit_indexes_and_imports = false
}
# We don't really need to collect a corpus for the host tools, just for the target.
lld_emit_indexes_and_imports =
lld_emit_indexes_and_imports && is_a_target_toolchain