Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 5d98153

Browse files
authored
build: disable swift-numerics on Darwin targets (#1060)
Disable the bundled swift-numerics by defualt on Darwin targets. This repairs the build as `-force-autoload-symbol` and `-incremental` are not currently supported on Darwin.
1 parent ff36d80 commit 5d98153

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@ option(USE_BUNDLED_CTENSORFLOW
2626
"Use the CTensorFlow module bundled in the active Swift toolchain" OFF)
2727
option(ENABLE_PYTHON_SUPPORT
2828
"Enable Python interop using PythonKit" ON)
29+
30+
# FIXME: disable swift-numerics on Darwin as `-force-autoload-symbol` and
31+
# `-incremental` do not play well together on Darwin.
32+
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
33+
set(ENABLE_SWIFT_NUMERICS_default NO)
34+
else()
35+
set(ENABLE_SWIFT_NUMERICS_default YES)
36+
endif()
2937
option(ENABLE_SWIFT_NUMERICS
30-
"Enable integrating swift-numerics" YES)
38+
"Enable integrating swift-numerics" ${ENABLE_SWIFT_NUMERICS_default})
3139

3240
if(ENABLE_SWIFT_NUMERICS)
3341
include(ExternalProject)

0 commit comments

Comments
 (0)