Skip to content

Commit dc02621

Browse files
authored
build: specify a compiler target for pythonkit on macOS (#30121)
Because the rest of the components have a deployment target of 10.13 explicitly, pass the same triple for the PythonKit build.
1 parent 820c01d commit dc02621

File tree

1 file changed

+9
-0
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+9
-0
lines changed

utils/swift_build_support/swift_build_support/products/pythonkit.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ def build(self, host_target):
4747
except OSError:
4848
pass
4949

50+
# SWIFT_ENABLE_TENSORFLOW
51+
target = ''
52+
if host_target.startswith('macosx'):
53+
target = '-DCMAKE_Swift_COMPILER_TARGET=x86_64-apple-macosx10.13'
54+
# SWIFT_ENABLE_TENSORFLOW END
55+
5056
with shell.pushd(self.build_dir):
5157
shell.call([
5258
self.toolchain.cmake,
@@ -56,6 +62,9 @@ def build(self, host_target):
5662
self.install_toolchain_path()),
5763
'-D', 'CMAKE_MAKE_PROGRAM={}'.format(self.toolchain.ninja),
5864
'-D', 'CMAKE_Swift_COMPILER={}'.format(swiftc),
65+
# SWIFT_ENABLE_TENSORFLOW
66+
target,
67+
# SWIFT_ENABLE_TENSORFLOW END
5968
'-B', self.build_dir,
6069
'-S', self.source_dir,
6170
])

0 commit comments

Comments
 (0)