mirror of
https://github.com/google/re2.git
synced 2025-10-16 22:38:54 +08:00
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>
This commit is contained in:
@@ -53,8 +53,12 @@ class BuildExt(setuptools.command.build_ext.build_ext):
|
||||
|
||||
cmd = ['bazel', 'build']
|
||||
try:
|
||||
cmd.append(f'--cpu={os.environ["BAZEL_CPU"].lower()}')
|
||||
cmd.append(f'--platforms=//python:{os.environ["BAZEL_CPU"].lower()}')
|
||||
cpu = os.environ['BAZEL_CPU']
|
||||
cmd.append(f'--cpu={cpu}')
|
||||
cmd.append(f'--platforms=//python:{cpu}')
|
||||
if cpu == 'x64_x86_windows':
|
||||
# Attempt to convince Bazel 7 that X64 can build for X86.
|
||||
cmd.append('--extra_execution_platforms=//python:x64_windows')
|
||||
except KeyError:
|
||||
pass
|
||||
# Register the local Python toolchain with highest priority.
|
||||
|
Reference in New Issue
Block a user