Commit cba65197 authored by brettw@chromium.org's avatar brettw@chromium.org

Hook up clang_use_chrome_plugins to the GN build.

Previously this was ignored in the GN build but disabling the plugin is used on some buildbots.

BUG=http://crbug.com/330298
R=thakis@chromium.org, thakis

Review URL: https://codereview.chromium.org/142053002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245602 0039d316-1c4b-4281-b951-d872f2087c98
parent aa0da252
...@@ -2,24 +2,32 @@ ...@@ -2,24 +2,32 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
declare_args() {
# Indicates if the build should use the Chrome-specific plugins for enforcing
# coding guidelines, etc.
clang_use_chrome_plugins = true
}
config("find_bad_constructs") { config("find_bad_constructs") {
cflags = [ if (clang_use_chrome_plugins) {
"-Xclang", "-load", cflags = [
"-Xclang", "-Xclang", "-load",
] "-Xclang",
]
if (is_mac) { if (is_mac) {
cflags += [ rebase_path( cflags += [ rebase_path(
"//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib", "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib",
".", root_build_dir) ] ".", root_build_dir) ]
} else if (is_linux) { } else if (is_linux) {
cflags += [ rebase_path( cflags += [ rebase_path(
"//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so", "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so",
".", root_build_dir) ] ".", root_build_dir) ]
} }
cflags += [ cflags += [
"-Xclang", "-add-plugin", "-Xclang", "-add-plugin",
"-Xclang", "find-bad-constructs", "-Xclang", "find-bad-constructs",
] ]
}
} }
...@@ -164,7 +164,6 @@ def GetArgsStringForGN(supplemental_files): ...@@ -164,7 +164,6 @@ def GetArgsStringForGN(supplemental_files):
# host_os=linux Probably can skip, GN knows the host OS. # host_os=linux Probably can skip, GN knows the host OS.
# order_text_section=<path> http://crbug.com/330299 # order_text_section=<path> http://crbug.com/330299
# chromium_win_pch=0 http://crbug.com/297678 # chromium_win_pch=0 http://crbug.com/297678
# clang_use_chrome_plugins=1 http://crbug.com/330298
# chromium_ios_signing=0 http://crbug.com/330302 # chromium_ios_signing=0 http://crbug.com/330302
# linux_use_tcmalloc=0 http://crbug.com/330303 # linux_use_tcmalloc=0 http://crbug.com/330303
# release_extra_flags=... http://crbug.com/330305 # release_extra_flags=... http://crbug.com/330305
...@@ -177,6 +176,7 @@ def GetArgsStringForGN(supplemental_files): ...@@ -177,6 +176,7 @@ def GetArgsStringForGN(supplemental_files):
('buildtype', 'Official', 'is_official_build=true'), ('buildtype', 'Official', 'is_official_build=true'),
('component', 'shared_library', 'is_component_build=true'), ('component', 'shared_library', 'is_component_build=true'),
('clang', '1', 'is_clang=true'), ('clang', '1', 'is_clang=true'),
('clang_use_chrome_plugins', '0', 'clang_use_chrome_plugins=false'),
('disable_glibcxx_debug', '1', 'disable_glibcxx_debug=true'), ('disable_glibcxx_debug', '1', 'disable_glibcxx_debug=true'),
('target_arch', 'ia32', 'cpu_arch="x86"'), ('target_arch', 'ia32', 'cpu_arch="x86"'),
('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'), ('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment