-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Driver: introduce -sysroot
option for non-Darwin targets
#72352
Conversation
Could we also pass |
Yes, that is the intention - to setup the clang importer to use the specified sysroot. It is odd that the value for the SDK is still being used as when |
Note that there already is a long-established way to do this, ie to pass I am fine in principle with switching that flag combo to your new combo of |
I don't mind working through the issues that are required for this. I've tried to structure changes such that |
I will look into that swift-driver issue in the coming week, though it will probably be good if more people look into it too.
Yep, I see you override where the
Understood, you and @etcwilde seemed to think |
@swift-ci please test |
@compnerd, have you worked on changing the meaning of the A head's up to @MaxDesiatov too, you'll want to change the SwiftPM SDK bundle config to use these new flags, as shown in the linked doc, once they're updated in the compiler and |
No, I'm trying to get the initial work in place so that this is usable and working so that we have a working state that we can work from rather than accidentally break something and then try to fix it. |
Oh, that's my point: this new flag in this pull is not going to break anything, so it should be fine, but your plans to change what The use of the |
This introduces a secondary flag `-sysroot` for the non-Darwin targets, primarily Unicies. The intention here is to support a split `-sdk`, `-sysroot` model where the `-sdk` parameter provides the Swift "SDK" which augments the native platform's C sysroot which is indicated as `-sysroot`. For the case of Android, this would allow us to provide a path to the NDK sysroot and the Swift SDK allowing us to cross-compile Android binaries from Windows.
@swift-ci please test |
@swift-ci please test macOS platform |
This introduces a secondary flag
-sysroot
for the non-Darwin targets, primarily Unicies. The intention here is to support a split-sdk
,-sysroot
model where the-sdk
parameter provides the Swift "SDK" which augments the native platform's C sysroot which is indicated as-sysroot
. For the case of Android, this would allow us to provide a path to the NDK sysroot and the Swift SDK allowing us to cross-compile Android binaries from Windows.