Skip to content

[stable/20240723][Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (#122035) #9816

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

Conversation

ian-twilightcoder
Copy link

@ian-twilightcoder ian-twilightcoder commented Jan 9, 2025

Embedded development often needs to use a different C standard library, replacing the existing one normally passed as -internal-externc-isystem. This works fine for an apple-macos target, but apple-none-macho doesn't work because the MachO driver doesn't implement
AddClangSystemIncludeArgs to add the resource directory as -internal-isystem like most other drivers do. Move most of the search path logic from Darwin and DarwinClang down into an AppleMachO toolchain between the MachO and Darwin toolchains.

Also define __MACH__ for apple-none-macho, as Swift expects all MachO targets to have that defined.

rdar://141248577

…resource directory after internal-externc-isystem when nostdlibinc is used (llvm#122035)

Embedded development often needs to use a different C standard library,
replacing the existing one normally passed as -internal-externc-isystem.
This works fine for an apple-macos target, but apple-none-macho doesn't
work because the MachO driver doesn't implement
AddClangSystemIncludeArgs to add the resource directory as
-internal-isystem like most other drivers do. Move most of the search
path logic from Darwin and DarwinClang down into an AppleMachO toolchain
between the MachO and Darwin toolchains.

Also define __MACH__ for apple-none-macho, as Swift expects all MachO
targets to have that defined.

rdar://141248577
@ian-twilightcoder ian-twilightcoder requested a review from a team as a code owner January 9, 2025 23:45
@ian-twilightcoder
Copy link
Author

@swift-ci test llvm

@ian-twilightcoder
Copy link
Author

@swift-ci test

@ian-twilightcoder
Copy link
Author

llvm Transforms/Util/auto-init-annotation-remarks.ll failure looks unrelated.

@ian-twilightcoder ian-twilightcoder merged commit 81859ac into swiftlang:stable/20240723 Jan 10, 2025
3 of 5 checks passed
@ian-twilightcoder ian-twilightcoder deleted the macho-driver branch January 10, 2025 21:13
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.

1 participant