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

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: add llvm_force_head_revision MB/GYP hack 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') | no next file with comments »
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..aa7b2a0969ffdb01e3f953e309e91ed506dd8a38 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -90,6 +90,27 @@ 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) {
+ # This is here so that all files get recompiled after a clang roll and
+ # 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.
+ 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.
@@ -222,14 +243,7 @@ config("compiler") {
}
if (is_clang && !is_nacl) {
- # This is here so that all files get recompiled after a clang roll and
- # 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" ]
Nico 2016/04/24 01:52:48 restore this to what it was (except with the added
Dirk Pranke 2016/04/24 20:49:18 I'm not sure I understand what you're asking here,
}
# 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 (clang_revision != "266460-1") {
Nico 2016/04/24 01:52:48 make this say if (llvm_force_head_revision) si
Dirk Pranke 2016/04/24 20:49:18 Okay, it wasn't clear to me if the intent was "ToT
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698