• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 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/chromeos/ui_mode.gni")
6import("//build/toolchain/toolchain.gni")
7
8default_clang_base_path = "//third_party/llvm-build/Release+Asserts"
9
10declare_args() {
11  # Indicates if the build should use the Chrome-specific plugins for enforcing
12  # coding guidelines, etc. Only used when compiling with Chrome's Clang, not
13  # Chrome OS's.
14  clang_use_chrome_plugins =
15      is_clang && !is_nacl && current_os != "zos" &&
16      default_toolchain != "//build/toolchain/cros:target"
17
18  enable_check_raw_ptr_fields =
19      build_with_chromium && !is_official_build &&
20      ((is_linux && !is_castos) || (is_android && !is_cast_android) || is_mac ||
21       is_win || is_chromeos_lacros || is_chromeos_ash)
22
23  # TODO(crbug.com/1446146): Merge with enable_check_raw_ptr_fields once both
24  # checks are activated on the same set of platforms.
25  enable_check_raw_ref_fields =
26      build_with_chromium && !is_official_build &&
27      ((is_linux && !is_castos) || (is_android && !is_cast_android) || is_win)
28
29  clang_base_path = default_clang_base_path
30
31  # Specifies whether or not bitcode should be embedded during compilation.
32  # This is used for creating a MLGO corpus from Chromium in the non-ThinLTO case.
33  clang_embed_bitcode = false
34
35  # Set to true to enable output of ThinLTO index and import files used for
36  # creating a Chromium MLGO corpus in the ThinLTO case.
37  lld_emit_indexes_and_imports = false
38}
39
40# We don't really need to collect a corpus for the host tools, just for the target.
41lld_emit_indexes_and_imports =
42    lld_emit_indexes_and_imports && is_a_target_toolchain
43