Skip to content

Commit

Permalink
Register the local 32-bit C++ toolchain with highest priority.
Browse files Browse the repository at this point in the history
Change-Id: I79d52e24ed00e875d1cfbb1f316139ad7639aff6
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62470
Reviewed-by: Paul Wankadia <[email protected]>
Reviewed-by: Alex Chernyakhovsky <[email protected]>
  • Loading branch information
junyer committed Jan 18, 2024
1 parent e6c83c9 commit bbfad95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def build_extension(self, ext):
cpu = os.environ['BAZEL_CPU']
cmd.append(f'--cpu={cpu}')
cmd.append(f'--platforms=//python:{cpu}')
if cpu == 'x64_x86_windows':
# Register the local 32-bit C++ toolchain with highest priority.
# (This is likely to break in some release of Bazel after 7.0.0,
# but this special case can hopefully be entirely removed then.)
cmd.append(f'--extra_toolchains=@local_config_cc//:cc-toolchain-{cpu}')
except KeyError:
pass
# Register the local Python toolchain with highest priority.
Expand Down

0 comments on commit bbfad95

Please sign in to comment.