Skip to content

Conversation

@finagolfin
Copy link
Member

getToolChain() and AddClangSystemIncludeArgs() don't parse the arguments to set the sysroot, so set it directly instead. Also, remove a redundant check for a valid directory.

Fixes #60224

@egorzhdan, let me know what you think, this fixes the issue with cross-compiling the stdlib from linux to Android.

@3405691582, please try it out with your OpenBSD cross-compile.

…find the libc header path

`getToolChain()` and `AddClangSystemIncludeArgs()` don't parse the arguments to set the
sysroot, so set it directly instead. Also, remove a redundant check for a valid directory.

Fixes swiftlang#60224
@3405691582
Copy link
Member

This seems to build successfully on Linux->OpenBSD cross-compile. I'll just try a clean from-scratch cross-compile just to be certain, but looking good so far.

@3405691582
Copy link
Member

3405691582 commented Aug 26, 2022

I thought I found an issue, but it's not attributable to your pr.

@3405691582
Copy link
Member

I think this LGTM with a from-scratch cross-compile build.

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@egorzhdan
Copy link
Contributor

@swift-ci please smoke test

@finagolfin
Copy link
Member Author

@egorzhdan, please go ahead and merge, I'd like to use this in the next trunk snapshot.

@egorzhdan egorzhdan merged commit 27ff49f into swiftlang:main Aug 31, 2022
@finagolfin finagolfin deleted the cross-sysroot branch August 31, 2022 10:25
@finagolfin
Copy link
Member Author

Thanks, this got the community Android CI building the stdlib again, now to look into the failing tests because of other unrelated issues.

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.

A recent C++ Interop pull broke cross-compiling the stdlib with an alternate sysroot for SwiftGlibc platforms

3 participants