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: http://src.chromium.org/svn/trunk/src/build@245602 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
brettw@chromium.org 2014-01-17 20:34:06 +00:00
Родитель abaa0fd581
Коммит b3af3ccb35
2 изменённых файлов: 29 добавлений и 21 удалений

Просмотреть файл

@ -2,24 +2,32 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config("find_bad_constructs") {
cflags = [
"-Xclang", "-load",
"-Xclang",
]
if (is_mac) {
cflags += [ rebase_path(
"//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib",
".", root_build_dir) ]
} else if (is_linux) {
cflags += [ rebase_path(
"//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so",
".", root_build_dir) ]
}
cflags += [
"-Xclang", "-add-plugin",
"-Xclang", "find-bad-constructs",
]
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") {
if (clang_use_chrome_plugins) {
cflags = [
"-Xclang", "-load",
"-Xclang",
]
if (is_mac) {
cflags += [ rebase_path(
"//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib",
".", root_build_dir) ]
} else if (is_linux) {
cflags += [ rebase_path(
"//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so",
".", root_build_dir) ]
}
cflags += [
"-Xclang", "-add-plugin",
"-Xclang", "find-bad-constructs",
]
}
}

Просмотреть файл

@ -164,7 +164,6 @@ def GetArgsStringForGN(supplemental_files):
# host_os=linux Probably can skip, GN knows the host OS.
# order_text_section=<path> http://crbug.com/330299
# 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
# linux_use_tcmalloc=0 http://crbug.com/330303
# release_extra_flags=... http://crbug.com/330305
@ -177,6 +176,7 @@ def GetArgsStringForGN(supplemental_files):
('buildtype', 'Official', 'is_official_build=true'),
('component', 'shared_library', 'is_component_build=true'),
('clang', '1', 'is_clang=true'),
('clang_use_chrome_plugins', '0', 'clang_use_chrome_plugins=false'),
('disable_glibcxx_debug', '1', 'disable_glibcxx_debug=true'),
('target_arch', 'ia32', 'cpu_arch="x86"'),
('target_arch', 'x64', 'cpu_arch="x64" force_win64=true'),