Skip to content

Commit 70abe6b

Browse files
committed
Attempt to convince Bazel 7 that X64 can build for X86.
Change-Id: I0b205639d1c71ccea7be88312a41defdc4207817 Reviewed-on: https://code-review.googlesource.com/c/re2/+/62430 Reviewed-by: Paul Wankadia <junyer@google.com> Reviewed-by: Perry Lorier <perryl@google.com>
1 parent 4e3b5cc commit 70abe6b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

python/setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ def build_extension(self, ext):
5353

5454
cmd = ['bazel', 'build']
5555
try:
56-
cmd.append(f'--cpu={os.environ["BAZEL_CPU"].lower()}')
57-
cmd.append(f'--platforms=//python:{os.environ["BAZEL_CPU"].lower()}')
56+
cpu = os.environ['BAZEL_CPU']
57+
cmd.append(f'--cpu={cpu}')
58+
cmd.append(f'--platforms=//python:{cpu}')
59+
if cpu == 'x64_x86_windows':
60+
# Attempt to convince Bazel 7 that X64 can build for X86.
61+
cmd.append('--extra_execution_platforms=//python:x64_windows')
5862
except KeyError:
5963
pass
6064
# Register the local Python toolchain with highest priority.

0 commit comments

Comments
 (0)