Skip to content

Commit f6c4cee

Browse files
authored
build: specify a compiler target for tensorflow-swift-apis on macOS
Because the rest of the components have a deployment target of 10.13 explicitly, pass the same triple for the tensorflow-swift-apis build.
1 parent 7c265e7 commit f6c4cee

File tree

1 file changed

+2
-1
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+2
-1
lines changed

utils/swift_build_support/swift_build_support/products/tensorflow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,16 @@ def build(self, host_target):
7171
'-D', 'CMAKE_MAKE_PROGRAM={}'.format(self.toolchain.ninja),
7272
'-D', 'CMAKE_Swift_COMPILER={}'.format(swiftc),
7373
# SWIFT_ENABLE_TENSORFLOW
74+
'-DCMAKE_Swift_COMPILER_TARGET=x86_64-apple-macosx10.13' if host_target.startswith('macosx') else '',
7475
'-D', 'USE_BUNDLED_CTENSORFLOW=YES',
75-
# SWIFT_ENABLE_TENSORFLOW END
7676
'-D', 'TensorFlow_INCLUDE_DIR={}'.format(tensorflow_source_dir),
7777
'-D', 'TensorFlow_LIBRARY={}'.format(
7878
os.path.join(tensorflow_source_dir, 'bazel-bin', 'tensorflow',
7979
lib_name)),
8080
'-D', 'CMAKE_Swift_FLAGS={}'.format('-L{}'.format(
8181
os.path.join(tensorflow_source_dir, 'bazel-bin', 'tensorflow'))
8282
),
83+
# SWIFT_ENABLE_TENSORFLOW END
8384
'-B', self.build_dir,
8485
'-S', self.source_dir,
8586
])

0 commit comments

Comments
 (0)