summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Smiley <keithbsmiley@gmail.com>2023-06-13 10:19:16 -0700
committerGitHub <noreply@github.com>2023-06-13 17:19:16 +0000
commitddf25c260162b01ec639739aad41ad6008343d22 (patch)
treed669268514b95dd8c755699b5d19da218fe91339
parentdab92884a6f031e63ac263e5de8a02f13ac42508 (diff)
downloadbazelbuild-apple_support-ddf25c260162b01ec639739aad41ad6008343d22.tar.gz
Add new XCODE_VERSION toolchain env var (#222)upstream/1.7.0
This can be used to invalidate the toolchain when your Xcode version changes but the path to Xcode doesn't. This is required if you want to avoid non-hermetic issues when switching Xcode versions. Previously we used USE_CLANG_CL for this since it was otherwise ignored, but we should move to this one which makes it more clear what the purpose is.
-rw-r--r--crosstool/setup.bzl3
1 files changed, 2 insertions, 1 deletions
diff --git a/crosstool/setup.bzl b/crosstool/setup.bzl
index 118b461..669050c 100644
--- a/crosstool/setup.bzl
+++ b/crosstool/setup.bzl
@@ -45,10 +45,11 @@ def _apple_cc_autoconf_impl(repository_ctx):
_apple_cc_autoconf = repository_rule(
environ = [
_DISABLE_ENV_VAR,
- "USE_CLANG_CL", # Kept as a hack for those who rely on this invaliding the toolchain
"DEVELOPER_DIR", # Used for making sure we use the right Xcode for compiling toolchain binaries
"GCOV", # TODO: Remove this
+ "USE_CLANG_CL", # Kept as a hack for those who rely on this invaliding the toolchain
"USER", # Used to allow paths for custom toolchains to be used by C* compiles
+ "XCODE_VERSION", # Force re-computing the toolchain by including the current Xcode version info in an env var
],
implementation = _apple_cc_autoconf_impl,
configure = True,