Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4960)

Unified Diff: build/config/compiler/BUILD.gn

Issue 1908293002: Add MB configs for ClangToTLinux* bots on FYI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix var name Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/scripts/update.py » ('j') | tools/mb/mb.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 07408d69c64d67f4159ae5b371295b97150f43a4..fd8f46eab1c8f203813e6757ad2c4d807b04d29b 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -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",
« no previous file with comments | « no previous file | tools/clang/scripts/update.py » ('j') | tools/mb/mb.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698