From 917047f3606d3ba9e2de0d383c3cd80c94ed732c Mon Sep 17 00:00:00 2001 From: Paul Wankadia Date: Thu, 28 Mar 2024 19:56:42 +0000 Subject: [PATCH] Tell Bazel the specific target version of macOS too. Sigh. Change-Id: I4f50d5299a0462d279042a2175995fff00ff97e4 Reviewed-on: https://code-review.googlesource.com/c/re2/+/62912 Reviewed-by: Paul Wankadia Reviewed-by: Jeff Bailey --- python/setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/setup.py b/python/setup.py index 93de80376..0f49f6cd5 100644 --- a/python/setup.py +++ b/python/setup.py @@ -61,6 +61,11 @@ def build_extension(self, ext): cmd.append(f'--extra_toolchains=@local_config_cc//:cc-toolchain-{cpu}') except KeyError: pass + try: + ver = os.environ['MACOSX_DEPLOYMENT_TARGET'] + cmd.append(f'--macos_minimum_os={ver}') + except KeyError: + pass # Register the local Python toolchains with highest priority. self.generate_python_toolchains() cmd.append('--extra_toolchains=//python/toolchains:all')