Configure the swiftImageInspectionShared to generate arch & sdk specific directories#16191
Configure the swiftImageInspectionShared to generate arch & sdk specific directories#16191lanza wants to merge 1 commit intoswiftlang:masterfrom lanza:inspect-arch-sdk
Conversation
|
@compnerd This should let me pull in the library paths changes. |
stdlib/public/runtime/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Can you see if you can get away with a generator expression?
set(FragileSupportLibrary swiftImageInspectionShared-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch})
set(LibraryLocation ${SWIFTSTATICLIBRARY_DIR}/${lowercase_sdk}/${arch})
add_custom_command_target(swift_image_inspection_${arch}_static
COMMAND
"${CMAKE_COMMAND} -E copy $<TARGET_FILE:${FragileSupportLibrary}> ${LibraryLocation}
...
stdlib/public/runtime/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Shouldn't the previous for loop cover this already?
There was a problem hiding this comment.
This is a temporary addition to put it at lib/swift_static/linux/libswiftImageInspectionShared.a since the compiler adds this as the linker path on master. The above loop puts them at lib/swift_static/linux/x86_64.
One of the PRs on top of this removes the code that does things for non-arch specific paths.
|
@swift-ci please test |
|
Build failed |
|
Build failed |
|
CI system error -_- |
|
@compnerd this was an error with Swift's CI |
|
@swift-ci please test |
|
Build failed |
|
@compnerd please test |
stdlib/public/runtime/CMakeLists.txt
Outdated
There was a problem hiding this comment.
"${LibraryLocationPrimary}/${CMAKE_STATIC_LIBRARY_PREFIX}swiftImageInspectionShared${CMAKE_STATIC_LIBRARY_SUFFIX}"
There was a problem hiding this comment.
Technically correct, but it is wrapped within if("${sdk}" STREQUAL "LINUX").
stdlib/public/runtime/CMakeLists.txt
Outdated
There was a problem hiding this comment.
"${LibraryLocation}/${CMAKE_STATIC_LIBRARY_PREFIX}swiftImageInspectionShared${CMAKE_STATIC_LIBRARY_SUFFIX}"
…fic libraries Previously, swiftImageInspectionShared generated one specific library at `lib/libswiftImageInspectionShared.a` for only the main arch and sdk. Generic cross compilation and various changes to the build system to get cross compilation to work will require swiftImageInspectionShared to generate libraries at the proper subdirectory. Change the outputs to agree with paths such as `lib/swift/linux/x86_64`
|
@compnerd please test |
|
@swift-ci please test |
|
Build failed |
Previously, swiftImageInspectionShared generated one specific library at
lib/libswiftImageInspectionShared.afor only the main arch and sdk.Generic cross compilation and various changes to the build system to get
cross compilation to work will require swiftImageInspectionShared to
generate libraries at the proper subdirectory. Change the outputs to
agree with paths such as
lib/swift/linux/x86_64Some ugly workarounds had to be used due to
add_swift_librarybeing invoked withIS_STDLIBcausing circular shared object dependencies withSwiftImageInspectionShared. Thus the libraries had to be manually copied to`swift_static.The copy/pasting from
lib/swift/linux/libswiftImageInspectionShared.ato ../swift_static/..` will be removed in an upcoming PR as it will no longer be needed.