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

Unified Diff: build/toolchain/toolchain.gni

Issue 2201983002: gn: Update clang_version when using ToT Clang (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/toolchain.gni
diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni
index f0e455282c1959d85da4564101719433f52cbad5..f389eec29e41bf0d97c8a8ade6b867d497fe386b 100644
--- a/build/toolchain/toolchain.gni
+++ b/build/toolchain/toolchain.gni
@@ -22,10 +22,13 @@ declare_args() {
# build/config/compiler/BUILD.gn).
use_lld = is_win && host_os != "win"
- if (is_clang) {
- # Clang compiler version. Clang files are placed at version-dependent paths.
- clang_version = "3.9.0"
- }
+ # 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
# Compile with Xcode version of clang instead of hermetic version shipped
# with the build. Used on iOS to ship official builds (as they are built
@@ -33,6 +36,17 @@ declare_args() {
use_xcode_clang = is_ios && is_official_build
}
+if (is_clang) {
+ # Clang compiler version. Clang files are placed at version-dependent paths.
+ clang_version = "3.9.0"
+
+ if (llvm_force_head_revision) {
+ # TODO(hans): Remove after next Clang roll.
+ # ToT Clang has a higher version number.
+ clang_version = "4.0.0"
+ }
+}
+
assert(!use_xcode_clang || is_ios,
"Using Xcode's clang is only supported in iOS builds")
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698