Register the local Python toolchain with highest priority.

Change-Id: I74f63bab5b0eab4296b1ed7dee9b98e76fdd3d64
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62374
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
This commit is contained in:
Paul Wankadia
2024-01-16 19:06:23 +00:00
parent f20d014aee
commit 95bb96b298

View File

@@ -57,6 +57,8 @@ class BuildExt(setuptools.command.build_ext.build_ext):
cmd.append(f'--platforms=//python:{os.environ["BAZEL_CPU"].lower()}')
except KeyError:
pass
# Register the local Python toolchain with highest priority.
cmd.append('--extra_toolchains=@local_config_python//:py_toolchain')
cmd += ['--compilation_mode=opt', '--', ':all']
self.spawn(cmd)