Skip to content

[5.5][build] Add the flags to enable cross-compiling the corelibs #38146

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 1 commit into from
Jul 9, 2021

Conversation

finagolfin
Copy link
Member

@finagolfin finagolfin commented Jun 29, 2021

Cherry-pick of #33724 and the test fix #38181

  • Explanation: Pass the Swift and CMake flags needed to cross-compile Foundation and so on, with the first example of Android. Add a new flag, --cross-compile-deps-path, which is used to search for cross-compiled libraries, like libcurl, that the corelibs depend on. Also add a new flag, --common-swift-flags, to pass additional Swift flags to the corelibs.
  • Scope: This only affects building cross-compilation toolchains with --cross-compile-hosts and currently does nothing for every cross-compilation host but Android.
  • Risk: None
  • Testing: I use this pull to cross-compile the 5.5 source snapshots for Android.
  • Reviewer: @gottesmm
  • Radar: rdar://80383978 (added by @gottesmm for CCC tracking purposes).

@finagolfin finagolfin requested a review from a team as a code owner June 29, 2021 01:55
"""
CMake flags to build for a platform, useful for cross-compiling
"""
return ''
Copy link
Member Author

Choose a reason for hiding this comment

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

Since empty strings are passed here for every cross-compilation host but Android, this pull is very safe.

@finagolfin
Copy link
Member Author

@drexin, would you run the CI on this?

@drexin
Copy link
Contributor

drexin commented Jun 29, 2021

@swift-ci test

@finagolfin
Copy link
Member Author

Single concurrency test failure on Win CI appears unrelated.

@finagolfin
Copy link
Member Author

Updated to include the test fix from #38181 and rebased.

@finagolfin
Copy link
Member Author

@drexin, would you run the CI on this again?

@drexin
Copy link
Contributor

drexin commented Jul 2, 2021

@swift-ci test

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

LGTM

@gottesmm
Copy link
Contributor

gottesmm commented Jul 8, 2021

@swift-ci nominate

Pass the Swift and CMake flags needed to cross-compile Foundation and so on, with
the first example of Android. Add a new flag, --cross-compile-deps-path, which is
used to search for cross-compiled libraries, like libcurl, that the corelibs
depend on. Also add a new flag, --common-swift-flags, to pass additional Swift
flags to the corelibs.
@finagolfin
Copy link
Member Author

Rebased and given the further failures of this single test on trunk, #38279, made this test linux-only, as it is the only platform on which I have tested it myself.

@drexin
Copy link
Contributor

drexin commented Jul 9, 2021

@swift-ci test

@gottesmm
Copy link
Contributor

gottesmm commented Jul 9, 2021

@swift-ci nominate

@gottesmm gottesmm merged commit a615d2c into swiftlang:release/5.5 Jul 9, 2021
@finagolfin
Copy link
Member Author

Thanks, everyone.

@finagolfin finagolfin deleted the cross-compile branch July 10, 2021 05:35
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