-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Runtimes][CMake] Find Shims, OnoneSupport and Concurrency in FindSwi… #81982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Runtimes][CMake] Find Shims, OnoneSupport and Concurrency in FindSwi… #81982
Conversation
…ftCore This way we will match most of the targets that would be exported via `SwiftCoreTargets.cmake`. Take the chance to amend the path to SwiftCore library for Windows. Addresses rdar://151700875
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we want to try to share most of the search logic across the platforms. The differences are the PLATFORM_SUBDIR
, which we can compute per platform or use the computation.
INTERFACE_INCLUDE_DIRECTORIES "${Shims_INCLUDE_DIR}/shims") | ||
target_link_libraries(swiftCore | ||
INTERFACE | ||
swiftShims) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is off
find_path(Shims_INCLUDE_DIR | ||
"shims/module.modulemap" | ||
HINTS | ||
"${Swift_SDKROOT}/usr/lib/swift") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use ${Swift_SDKROOT}/usr/lib/swift_static
as a primary hint?
elseif(WIN32) | ||
find_path(SwiftCore_INCLUDE_DIR | ||
"Swift.swiftmodule" | ||
HINTS | ||
"${Swift_SDKROOT}/usr/lib/swift/windows" | ||
"$ENV{SDKROOT}/usr/lib/swift/windows") | ||
find_library(SwiftCore_LIBRARY | ||
NAMES "libswiftCore.lib" | ||
NAMES "swiftCore.lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a if(BUILD_SHARED_LIBS)
clause around this. The import library for swiftCore is swiftCore.lib
, the static library is libswiftCore.lib
.
...instead of platforms. Assessing my understanding of swiftlang#81982 (review)
…ftCore
This way we will match most of the targets that would be exported via
SwiftCoreTargets.cmake
.Take the chance to amend the path to SwiftCore library for Windows.
Addresses rdar://151700875