Add MB configs for ClangToTLinux* bots on FYI
The tip-of-tree Clang bots rely on an environment variable called LLVM_FORCE_HEAD_REVISION to be set in order to know to fetch the tip-of-tree Clang and use its version in the compile time defines, rather than the checked-in version. We don't want GN to use or depend on environment variables, so this patch modifies the clang update script to also look at a new command line arg, and adds a GN arg called 'llvm_force_head_revision' to cause the same effect. However, we need to keep the env var around for `gclient runhooks` and to keep the existing bots (and devs) working while on GYP, and, perhaps more importantly, adding a new GYP_DEFINE that does what we need to build/common.gypi is proving intractable, so we hack MB to rewrite what the GYP_DEFINE would be if life made sense back into the env var. BUG=481692, 582737 R=thakis@chromium.org, brettw@chromium.org Review URL: https://codereview.chromium.org/1908293002 Cr-Original-Commit-Position: refs/heads/master@{#389408} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 909bad6afa7124f67c4890f3c1bc244179141978
This commit is contained in:
Родитель
c0a35554ce
Коммит
7181610b0c
|
@ -90,6 +90,23 @@ declare_args() {
|
|||
# Gold icf level, values are "none", "safe", "all". If value isn't overridden,
|
||||
# default initialization is below.
|
||||
gold_icf_level = ""
|
||||
|
||||
# If this is set to true, or if LLVM_FORCE_HEAD_REVISION is set to 1
|
||||
# in the environment, we use the revision in the llvm repo to determine
|
||||
# the CLANG_REVISION to use, instead of the version hard-coded into
|
||||
# //tools/clang/scripts/update.py. This should only be used in
|
||||
# conjunction with setting LLVM_FORCE_HEAD_REVISION in the
|
||||
# environment when `gclient runhooks` is run as well.
|
||||
llvm_force_head_revision = false
|
||||
}
|
||||
|
||||
if (is_clang && !is_nacl) {
|
||||
update_args = [ "--print-revision" ]
|
||||
if (llvm_force_head_revision) {
|
||||
update_args += [ "--llvm-force-head-revision" ]
|
||||
}
|
||||
clang_revision =
|
||||
exec_script("//tools/clang/scripts/update.py", update_args, "trim string")
|
||||
}
|
||||
|
||||
# Apply the default logic for these values if they were not set explicitly.
|
||||
|
@ -226,10 +243,7 @@ config("compiler") {
|
|||
# when turning clang on or off. (defines are passed via the command line,
|
||||
# and build system rebuild things when their commandline changes). Nothing
|
||||
# should ever read this define.
|
||||
defines +=
|
||||
[ "CR_CLANG_REVISION=" + exec_script("//tools/clang/scripts/update.py",
|
||||
[ "--print-revision" ],
|
||||
"trim string") ]
|
||||
defines += [ "CR_CLANG_REVISION=$clang_revision" ]
|
||||
}
|
||||
|
||||
# Non-Mac Posix compiler flags setup.
|
||||
|
@ -974,9 +988,7 @@ config("default_warnings") {
|
|||
"-Wno-shift-negative-value",
|
||||
]
|
||||
|
||||
if (exec_script("//tools/clang/scripts/update.py",
|
||||
[ "--print-revision" ],
|
||||
"trim string") != "266460-1") {
|
||||
if (llvm_force_head_revision) {
|
||||
cflags += [
|
||||
# TODO(thakis): https://crbug.com/604888
|
||||
"-Wno-undefined-var-template",
|
||||
|
|
Загрузка…
Ссылка в новой задаче