mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
For compiling codes required for macro support, we now need swiftc compiler in the build machine. Unlike Darwin OSes, where swiftCore runtime is guaranteed to be present in /usr/lib, Linux doesn't have ABI stability and the stdlib of the build machine is not at the specific location. So the built compiler cannot relies on the shared object in the toolchain.
21 lines
593 B
CMake
21 lines
593 B
CMake
if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
|
|
("${SWIFT_HOST_VARIANT_ARCH}" STREQUAL "${SWIFT_PRIMARY_VARIANT_ARCH}"))
|
|
add_swift_unittest(SwiftThreadingTests IS_TARGET_TEST
|
|
Mutex.cpp
|
|
ConditionVariable.cpp
|
|
Once.cpp
|
|
LinuxUlock.cpp
|
|
Fatal.cpp
|
|
)
|
|
|
|
target_link_libraries(SwiftThreadingTests
|
|
PRIVATE
|
|
swiftThreading${SWIFT_PRIMARY_VARIANT_SUFFIX}
|
|
swiftCore${SWIFT_PRIMARY_VARIANT_SUFFIX}
|
|
)
|
|
|
|
if(SWIFT_HOST_VARIANT STREQUAL "windows")
|
|
target_link_libraries(SwiftThreadingTests PRIVATE Synchronization)
|
|
endif()
|
|
endif()
|