File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -794,6 +794,11 @@ class BuildScriptInvocation(object):
794
794
args .build_jobs )
795
795
]
796
796
797
+ # SWIFT_ENABLE_TENSORFLOW
798
+ if args .enable_tensorflow :
799
+ impl_args += ["--enable-tensorflow" ]
800
+ # SWIFT_ENABLE_TENSORFLOW END
801
+
797
802
impl_args += args .build_script_impl_args
798
803
799
804
if args .dry_run :
Original file line number Diff line number Diff line change @@ -243,6 +243,10 @@ KNOWN_SETTINGS=(
243
243
skip-merge-lipo-cross-compile-tools " " " set to skip running merge-lipo after installing cross-compiled host Swift tools"
244
244
coverage-db " " " If set, coverage database to use when prioritizing testing"
245
245
skip-local-host-install " " " If we are cross-compiling multiple targets, skip an install pass locally if the hosts match"
246
+
247
+ # SWIFT_ENABLE_TENSORFLOW
248
+ enable-tensorflow " " " If true, enable compiling with TensorFlow support"
249
+ # SWIFT_ENABLE_TENSORFLOW END
246
250
)
247
251
248
252
components=(
@@ -1671,6 +1675,10 @@ for host in "${ALL_HOSTS[@]}"; do
1671
1675
-DSWIFT_TOOLS_ENABLE_LTO:STRING=" ${SWIFT_TOOLS_ENABLE_LTO} "
1672
1676
-DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER:BOOL=$( true_false " ${BUILD_RUNTIME_WITH_HOST_COMPILER} " )
1673
1677
-DLIBDISPATCH_CMAKE_BUILD_TYPE:STRING=" ${LIBDISPATCH_BUILD_TYPE} "
1678
+
1679
+ # SWIFT_ENABLE_TENSORFLOW
1680
+ -DSWIFT_ENABLE_TENSORFLOW:BOOL=$( true_false " ${ENABLE_TENSORFLOW} " )
1681
+ # SWIFT_ENABLE_TENSORFLOW END
1674
1682
" ${swift_cmake_options[@]} "
1675
1683
)
1676
1684
@@ -1719,13 +1727,6 @@ for host in "${ALL_HOSTS[@]}"; do
1719
1727
)
1720
1728
fi
1721
1729
1722
- if [[ " ${ENABLE_TENSORFLOW} " ]] ; then
1723
- cmake_options=(
1724
- " ${cmake_options[@]} "
1725
- -DSWIFT_ENABLE_TENSORFLOW:BOOL=TRUE
1726
- )
1727
- fi
1728
-
1729
1730
if [[ ! " ${SKIP_BUILD_LLDB} " ]] ; then
1730
1731
lldb_build_dir=$( build_directory ${host} lldb)
1731
1732
cmake_options=(
You can’t perform that action at this time.
0 commit comments