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 # Use this instead of clang_use_chrome_plugins to enable just the raw-ptr-plugin. 19 clang_use_raw_ptr_plugin = false 20 21 enable_check_raw_ptr_fields = 22 build_with_chromium && !is_official_build && 23 ((is_linux && !is_castos) || (is_android && !is_cast_android) || is_mac || 24 is_ios || is_win || is_chromeos_lacros || is_chromeos_ash) 25 26 # TODO(crbug.com/40268473): Merge with enable_check_raw_ptr_fields once both 27 # checks are activated on the same set of platforms. 28 enable_check_raw_ref_fields = 29 build_with_chromium && !is_official_build && 30 ((is_linux && !is_castos) || (is_android && !is_cast_android) || is_win || 31 is_mac || is_ios || is_chromeos_lacros || is_chromeos_ash) 32 33 clang_base_path = default_clang_base_path 34 35 # Specifies whether or not bitcode should be embedded during compilation. 36 # This is used for creating a MLGO corpus from Chromium in the non-ThinLTO case. 37 clang_embed_bitcode = false 38 39 # Set to true to enable output of ThinLTO index and import files used for 40 # creating a Chromium MLGO corpus in the ThinLTO case. 41 lld_emit_indexes_and_imports = false 42} 43 44# We don't really need to collect a corpus for the host tools, just for the target. 45lld_emit_indexes_and_imports = 46 lld_emit_indexes_and_imports && is_a_target_toolchain 47