1 --- a/build/config/clang/clang.gni
2 +++ b/build/config/clang/clang.gni
4 default_clang_base_path = "//third_party/llvm-build/Release+Asserts"
7 + # Enable clang plugins (-Xclang)
8 + clang_use_plugins = true
12 # Indicates if the build should use the Chrome-specific plugins for enforcing
13 # coding guidelines, etc. Only used when compiling with Chrome's Clang, not
15 clang_use_chrome_plugins =
16 is_clang && !is_nacl && !use_xcode_clang &&
17 - default_toolchain != "//build/toolchain/cros:target"
18 + default_toolchain != "//build/toolchain/cros:target" &&
21 clang_base_path = default_clang_base_path
23 --- a/build/config/compiler/BUILD.gn
24 +++ b/build/config/compiler/BUILD.gn
27 # Enable text section splitting only on linux when using lld for now. Other
28 # platforms can be added later if needed.
29 - if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
30 + if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting && clang_use_plugins) {
31 ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
37 # Makes builds independent of absolute file path.
38 - if (is_clang && strip_absolute_paths_from_debug_symbols) {
39 + if (is_clang && strip_absolute_paths_from_debug_symbols && clang_use_plugins) {
40 # If debug option is given, clang includes $cwd in debug info by default.
41 # For such build, this flag generates reproducible obj files even we use
42 # different build directory like "out/feature_a" and "out/feature_b" if
44 # All configs using /DEBUG should include this:
45 configs = [ ":win_pdbaltpath" ]
48 + if (is_clang && clang_use_plugins) {
49 # Use constructor debug mode. This option reduces debug info more than
50 # -fno-standalone-debug by emitting class type information only when
51 # constructors are emitted.
55 # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
56 - if (is_clang && !is_nacl && !use_xcode_clang && !is_apple) {
57 + if (is_clang && !is_nacl && !use_xcode_clang && !is_apple && clang_use_plugins) {
60 "-debug-info-kind=constructor",