Skip to content

Commit 7c265e7

Browse files
committed
[build] Assorted toolchain build fixes.
- Improve TensorFlow macOS preset organization. Move things to the base preset. - Install Python/TensorFlow in the correct location.
1 parent 196e696 commit 7c265e7

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

utils/build-presets.ini

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,6 +2383,11 @@ swift-primary-variant-arch=x86_64
23832383
enable-tensorflow
23842384
install-tensorflow
23852385

2386+
tensorflow-swift-apis
2387+
install-tensorflow-swift-apis
2388+
pythonkit
2389+
install-pythonkit
2390+
23862391
[preset: tensorflow_osx]
23872392
mixin-preset=tensorflow_osx_base
23882393
test
@@ -2393,9 +2398,6 @@ stress-test
23932398

23942399
[preset: tensorflow_osx,no_test]
23952400
mixin-preset=tensorflow_osx_base
2396-
tensorflow-swift-apis
2397-
pythonkit
2398-
install-pythonkit
23992401
skip-test-cmark
24002402
skip-test-swift
24012403
skip-test-swiftpm
@@ -2408,9 +2410,6 @@ skip-test-playgroundsupport
24082410
mixin-preset=
24092411
tensorflow_osx
24102412
mixin_codesigning
2411-
tensorflow-swift-apis
2412-
pythonkit
2413-
install-pythonkit
24142413
darwin-toolchain-installer-package=%(darwin_toolchain_installer_package)s
24152414

24162415
[preset: tensorflow_osx,no_test,installer]

utils/swift_build_support/swift_build_support/products/pythonkit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def build(self, host_target):
5353
'-G', 'Ninja',
5454
'-D', 'BUILD_SHARED_LIBS=YES',
5555
'-D', 'CMAKE_INSTALL_PREFIX={}/usr'.format(
56-
self.args.install_destdir),
56+
self.install_toolchain_path()),
5757
'-D', 'CMAKE_MAKE_PROGRAM={}'.format(self.toolchain.ninja),
5858
'-D', 'CMAKE_Swift_COMPILER={}'.format(swiftc),
5959
'-B', self.build_dir,

utils/swift_build_support/swift_build_support/products/tensorflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def build(self, host_target):
6767
'-G', 'Ninja',
6868
'-D', 'BUILD_SHARED_LIBS=YES',
6969
'-D', 'CMAKE_INSTALL_PREFIX={}/usr'.format(
70-
self.args.install_destdir),
70+
self.install_toolchain_path()),
7171
'-D', 'CMAKE_MAKE_PROGRAM={}'.format(self.toolchain.ninja),
7272
'-D', 'CMAKE_Swift_COMPILER={}'.format(swiftc),
7373
# SWIFT_ENABLE_TENSORFLOW

0 commit comments

Comments
 (0)