Skip to content

Non-Darwin SDKs product results in per-arch directories. #225

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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,9 @@ install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}XCTest${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION
${CMAKE_INSTALL_FULL_LIBDIR}/swift/${swift_os})

if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
Copy link

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 now installing two distinct copies of libXCTest.so onto the system here? Would it be possible to use a symlink instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not merge or take time on this merge request for the moment. I have to review the approach.

There is two copies. This change was a change compatible with the current setup and the setup from swiftlang/swift#19432, which moves the binary libraries into the architecture directories for platforms that do not support fat libraries (every platform except Darwin). The duplication allowed me to merge this while working in the other change, and keep things working.

The symlink approach would work for some platforms, but not others (Windows), so I decided for a simpler copy, since this was going to be a temporal solution.

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}XCTest${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION
${CMAKE_INSTALL_FULL_LIBDIR}/swift/${swift_os}/${swift_host_arch})
endif()