Try to get things working again with Bazel 7.

Specifically, try passing `--platforms` as well as `--cpu`.
(The latter is going away eventually, but keep it for now.)

Change-Id: Id53ba7b91008c7b90b1e9d242a3eded3e65007b8
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62370
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
This commit is contained in:
Paul Wankadia
2024-01-16 15:24:25 +00:00
parent 32c181e0aa
commit c644d9aaec
2 changed files with 37 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ 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()}')
except KeyError:
pass
cmd += ['--compilation_mode=opt', '--', ':all']