-
Notifications
You must be signed in to change notification settings - Fork 1.2k
build: Install libraries in an arch
sub-folder
#5257
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?
build: Install libraries in an arch
sub-folder
#5257
Conversation
@swift-ci please test |
This is the proper installation scheme for Swift libraries and prevents having to manually copy them in `build.ps1`.
ef23f75
to
ea40b13
Compare
@swift-ci please 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'm still not entirely sure I'm following what this change is intended to do - could you elaborate on the background/context a bit more? My current understanding is that when we ship the toolchain we ship a single swift module with multiple architectures within it. Do I have that right? And if so, is this intending to change how that is done but only on some platforms where SwiftFoundation_INSTALL_ARCH_SUBDIR
is set?
endif() | ||
|
||
if(NOT SwiftFoundation_ARCH) | ||
if(CMAKE_Swift_COMPILER_VERSION VERSION_EQUAL 0.0.0 OR CMAKE_Swift_COMPILER_VERSION VERSION_GREATER_EQUAL 6.2) |
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 don't think these version checks are necessary - the main
branch of Foundation must be built using at least a recent nightly snapshot of the main
branch of the compiler, so this check should never fail
@@ -23,8 +70,8 @@ function(_foundation_install_target module) | |||
endif() | |||
|
|||
install(TARGETS ${module} | |||
ARCHIVE DESTINATION lib/${swift}/${swift_os} | |||
LIBRARY DESTINATION lib/${swift}/${swift_os} | |||
ARCHIVE DESTINATION lib/${swift}/${SwiftFoundation_PLATFORM}$<$<BOOL:${SwiftFoundation_INSTALL_ARCH_SUBDIR}>:/${SwiftFoundation_ARCH}> |
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.
It looks like you're only applying the arch subdirectory at install time for the swift modules. What about the other C modules for the static SDK?
This is the proper installation scheme for Swift libraries on Windows and prevents having to manually copy them in
build.ps1
.