Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

compnerd
Copy link
Member

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.

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@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.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

1 similar comment
@compnerd
Copy link
Member Author

@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}>"
Copy link
Member

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.

Copy link
Member Author

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?

@compnerd
Copy link
Member Author

I'm going to close this in favour of #78860

@compnerd compnerd closed this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants