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

Conversation

drodriguez
Copy link
Contributor

Depends on swiftlang/swift#19432

Unix (other than Darwin) and Windows do not support fat binaries.
However, the build system was placing the build results in the
platform/OS folder, instead of the per-architecture folder. Having two
architectures side by side was impossible.

After applying the above patch in the Swift compiler, non-Darwin
platforms will look into the per-architecture folders, so the sibling
projects need to leave the products in the right place.

Depends on swiftlang/swift#19432

Unix (other than Darwin) and Windows do not support fat binaries.
However, the build system was placing the build results in the
platform/OS folder, instead of the per-architecture folder. Having two
architectures side by side was impossible.

After applying the above patch in the Swift compiler, non-Darwin
platforms will look into the per-architecture folders, so the sibling
projects need to leave the products in the right place.
@@ -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.

@drodriguez drodriguez closed this Oct 3, 2019
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