summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Peter Collingbourne <pcc@google.com> 2021-09-08 13:46:01 -0700
committer Peter Collingbourne <pcc@google.com> 2021-09-08 13:46:01 -0700
commitcbfbd6482393437ac68f51e59d875572a70629a1 (patch)
treea6ab66f10b9498a26b399e9904b0e2008ac75436
parent380dbb9327358dca18a9071853e7148e325fc6ed (diff)
Read LLVM version from $LLVM_PREBUILTS_VERSION if set.
This matches the behavior of the build system. Change-Id: Idce0a48403acde100e20246896a1ec68df6b73c7
-rwxr-xr-xscripts/get_clang_version.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/get_clang_version.py b/scripts/get_clang_version.py
index f6efc5f82..74bc9debb 100755
--- a/scripts/get_clang_version.py
+++ b/scripts/get_clang_version.py
@@ -21,8 +21,12 @@ import sys
ANDROID_BUILD_TOP = os.environ.get("ANDROID_BUILD_TOP", ".")
+LLVM_PREBUILTS_VERSION = os.environ.get("LLVM_PREBUILTS_VERSION")
def get_clang_prebuilts_version(global_go):
+ if LLVM_PREBUILTS_VERSION:
+ return LLVM_PREBUILTS_VERSION
+
# TODO(b/187231324): Get clang version from the json file once it is no longer
# hard-coded in global.go
if global_go is None: