Skip to content

[Unix] Use the new -sysroot flag for all non-Darwin Unix platforms, not just Android (#1811) #1819

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
Feb 27, 2025

Conversation

finagolfin
Copy link
Member

Explanation: This makes two changes:

  1. Use the new flag on all Unix platforms, as in the original frontend pull where it was introduced, Driver: introduce -sysroot option for non-Darwin targets swift#72352.
  2. When compiling for Android and ANDROID_NDK_ROOT is unset, fall back to the -sdk as the sysroot when linking.

I'm primarily concerned with 2., as it got a few packages cross-compiling again with both my trunk and 6.1 Android SDK bundles, but I went ahead and updated 1. also, when I looked into how that new -sysroot flag was introduced in that linked compiler frontend pull.

Scope: Only affects Unix platforms and Android

Issue: None

Original PR: #1811

Risk: Very low

Testing: Passed all CI on trunk and appears to fix getting my Android SDK bundle working with this new swift-driver again, because of 2.

Reviewer: @compnerd

… not just Android (swiftlang#1811)

This makes two changes:

1. Use the new flag on all Unix platforms, as in the original frontend pull where
   it was introduced, swiftlang/swift#72352.
2. When compiling for Android and `ANDROID_NDK_ROOT` is unset, fall back to the
   `-sdk` as the sysroot when linking.
@finagolfin
Copy link
Member Author

@swift-ci please test

@finagolfin
Copy link
Member Author

Ping @nkcsgexi, small pull for 6.1 that primarily only affects cross-compiling for Android.

@finagolfin
Copy link
Member Author

Thanks for the quick review. 😃

@finagolfin finagolfin merged commit a7f8f9f into swiftlang:release/6.1 Feb 27, 2025
3 checks passed
@finagolfin finagolfin deleted the droid branch February 27, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants