Skip to content

[CMake] Cross-compiling dylib support on macOS #5165

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

modocache
Copy link
Contributor

When compiling shared libraries from macOS to Linux or Android, specify a .so library suffix, and pass -shared to the linker.

This was pulled out of the larger pull request #4972, which addresses SR-1362.

When compiling shared libraries from macOS to Linux or Android, specify
a .so library suffix, and pass -shared to the linker.
@modocache
Copy link
Contributor Author

@swift-ci Please test

@@ -269,7 +269,7 @@ function(_add_variant_link_flags)
set(oneValueArgs SDK ARCH BUILD_TYPE ENABLE_ASSERTIONS ANALYZE_CODE_COVERAGE
DEPLOYMENT_VERSION_IOS RESULT_VAR_NAME ENABLE_LTO LTO_OBJECT_NAME)
cmake_parse_arguments(LFLAGS
""
"IS_STDLIB"
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems wrong. What's special about the stdlib over, say, libSwiftGlibc?

@swift-ci
Copy link
Contributor

swift-ci commented Oct 6, 2016

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - a0b1cfd
Test requested by - @modocache

@modocache
Copy link
Contributor Author

modocache commented Oct 7, 2016

I'm reducing the scope of my original pull request #4972, to only enable building static libraries. This change isn't necessary to build statically, plus it seems like I'll need a different approach anyway, so I'll close this for now. Thanks!

@modocache modocache closed this Oct 7, 2016
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.

5 participants