Skip to content

Commit

Permalink
Add new XCODE_VERSION toolchain env var (#222)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
keith authored Jun 13, 2023
1 parent dab9288 commit ddf25c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crosstool/setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ddf25c2

Please sign in to comment.