Skip to content

Commit 0df0544

Browse files
authored
Merge pull request #29062 from compnerd/not-keeping-track
stdlib: remove unnecessarily complex library detection
2 parents b215368 + edf0549 commit 0df0544

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,16 @@ endif()
7272
# SWIFT_ENABLE_TENSORFLOW
7373
if(SWIFT_BUILD_STDLIB)
7474
add_subdirectory(Python)
75-
endif()
7675

77-
# SWIFT_ENABLE_TENSORFLOW
78-
# Note: Python should be built before TensorFlow because Python is a
79-
# dependency for `numpy.ndarray` bridging to `ShapedArray`/`Tensor`.
80-
if(SWIFT_BUILD_STDLIB AND SWIFT_ENABLE_TENSORFLOW)
81-
# TODO: Add TensorFlow support for iOS/Raspberry Pi.
82-
add_subdirectory(CTensorFlow)
83-
add_subdirectory(TensorFlow)
76+
# Note: Python should be built before TensorFlow because Python is a
77+
# dependency for `numpy.ndarray` bridging to `ShapedArray`/`Tensor`.
78+
if(SWIFT_ENABLE_TENSORFLOW)
79+
# TODO: Add TensorFlow support for iOS/Raspberry Pi.
80+
add_subdirectory(CTensorFlow)
81+
add_subdirectory(TensorFlow)
82+
endif()
8483
endif()
84+
# SWIFT_ENABLE_TENSORFLOW END
8585

8686
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_REMOTE_MIRROR)
8787
add_subdirectory(Reflection)

stdlib/public/Python/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#
1515
#===----------------------------------------------------------------------===#
1616

17-
set(SWIFT_PYTHON_EXISTS TRUE PARENT_SCOPE)
18-
1917
set(SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES)
2018
if(SWIFT_BUILD_DYNAMIC_SDK_OVERLAY)
2119
list(APPEND SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES SHARED)

stdlib/public/TensorFlow/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ if (TENSORFLOW_SWIFT_APIS)
4545
endforeach()
4646
endif()
4747

48-
# When Python exists, PythonConversion.swift imports it, so it must be
49-
# available at link time.
50-
set(TENSORFLOW_DEPENDS_PYTHON)
51-
if (SWIFT_PYTHON_EXISTS)
52-
list(APPEND TENSORFLOW_DEPENDS_PYTHON SWIFT_MODULE_DEPENDS Python)
53-
endif()
54-
5548
add_swift_target_library(swiftTensorFlow ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
5649
"${SOURCES}"
5750

@@ -67,7 +60,7 @@ add_swift_target_library(swiftTensorFlow ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_
6760
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
6861
SWIFT_MODULE_DEPENDS_HAIKU Glibc
6962
SWIFT_MODULE_DEPENDS_WINDOWS MSVCRT
70-
${TENSORFLOW_DEPENDS_PYTHON}
63+
SWIFT_MODULE_DEPENDS Python
7164
SWIFT_COMPILE_FLAGS "${swift_stdlib_compile_flags}"
7265
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
7366
INSTALL_IN_COMPONENT stdlib

0 commit comments

Comments
 (0)