-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Runtimes: fix the install location for -static
#78722
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
Conversation
@swift-ci please test |
1b10346
to
a9f7307
Compare
@swift-ci please smoke test |
When building the static SDK, we need to adjust the install locations so that the driver search will find the proper swiftmodule and library. The changes here adjust the install to use `swift_static` when building statically.
a9f7307
to
c4e94fe
Compare
@swift-ci please test |
@swift-ci please test macOS platform |
1 similar comment
@swift-ci please test macOS platform |
install(TARGETS swiftCore) | ||
install(TARGETS swiftCore | ||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/$<$<NOT:$<PLATFORM_ID:Darwin>>:swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${SwiftCore_PLATFORM_SUBDIR}/${SwiftCore_ARCH_SUBDIR}>" | ||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/$<$<NOT:$<PLATFORM_ID:Darwin>>:swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/${SwiftCore_PLATFORM_SUBDIR}/${SwiftCore_ARCH_SUBDIR}>" |
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.
The <platform>/<arch>
install directory is not correct for all build configurations either. The macOS builds, for instance, should be to /usr/lib/swift/libswiftCore.dylib
, not /usr/lib/swift/macosx/arm64
. Please add an option to disable the including the extra directories. Same for the swift module.
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.
The $<NOT:$<PLATFORM_ID:Darwin>>
does that though. Is there a reason to generalise this into an option?
I'm going to close this in favour of #78860 |
When building the static SDK, we need to adjust the install locations so that the driver search will find the proper swiftmodule and library. The changes here adjust the install to use
swift_static
when building statically.