Skip to content

Android build on macOS Cross-Compile host: Fixes wrong Ninja rules generation. #25576

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

Merged
merged 2 commits into from
Jun 22, 2019

Conversation

vgorloff
Copy link
Contributor

Cmake generates rules.ninja and build.ninja with macOS specific default linker options. That default options (like -dynamiclib -Wl,-headerpad_max_install_names) cause link errors when performing cross-compilation for Android.

Similar fixes for Window host already done. This PR provided fixes for macOS host.

@vgorloff
Copy link
Contributor Author

@swift-ci please test

@vgorloff
Copy link
Contributor Author

@compnerd Will be nice if you find a time to look on this PR.

@compnerd
Copy link
Member

CC: @Rostepher @gottesmm @gwynne @jrose-apple

The build complexity is getting pretty absurd at this point. I think that we need to speed up the changes to break the standard library builds into sub-configures so that we can let CMake deal with the flags for the cross-compilation.

@jrose-apple
Copy link
Contributor

Again, I have no objections as long as the different target platforms continue to build in parallel.

@vgorloff
Copy link
Contributor Author

Thank you!

Requested changes seems done.

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

I'm not happy with this, but lets improve things after things are working. Please squash the changes before merging.

@vgorloff
Copy link
Contributor Author

@swift-ci please test

@vgorloff
Copy link
Contributor Author

Hm. Seems like CI not picking this PR for smoke test after adding comment @swift-ci please test. I saw that other PRs were built. Is it something related to privileges of one who adds comment @swift-ci please test? If this is a case, then can you please add comment for triggering CI.

Thank you!

@jrose-apple
Copy link
Contributor

@swift-ci Please test

@swift-ci

This comment has been minimized.

@swift-ci

This comment has been minimized.

@compnerd compnerd merged commit 62dd6bd into swiftlang:master Jun 22, 2019
@vgorloff vgorloff deleted the macos-to-android-crosscompile branch June 22, 2019 00:08
@compnerd
Copy link
Member

compnerd commented Jul 4, 2019

I believe that this is breaking the android SDK builds on Windows :-(. We no longer pass -soname which means that the library soname is wrong.

@vgorloff
Copy link
Contributor Author

vgorloff commented Jul 4, 2019

Seems like another if/else block needed .)

@compnerd
Copy link
Member

compnerd commented Jul 4, 2019

@vgorloff - found the issue, its a dereferencing behavior change in CMake, PR25973 addresses that.

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.

4 participants