Skip to content
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

Allow passing -nostdlib to clang linker driver #1547

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MaxDesiatov
Copy link
Contributor

Embedded targets may need -nostdlib passed to clang linker driver in certain situations, see #1534 for more details.

Currently, swiftc doesn't recognize -nostdlib at all, while -Xlinker -nostdlib passed to a swiftc link job from the build system will be passed verbatim to the linker and not recognized by the linker driver. We should support this flag in swiftc to fix this.

Embedded targets may need `-nostdlib` passed to `clang` linker driver in certain situations, see #1534 for more details.

Currently, `swiftc` doesn't recognize `-nostdlib` at all, while `-Xlinker -nostdlib` passed to a `swiftc` link job from the build system will be passed verbatim to the linker and not recognized by the linker driver. We should support this flag in `swiftc` to fix this.
@MaxDesiatov MaxDesiatov added the embedded Changes related to Embedded Swift label Feb 20, 2024
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov self-assigned this Feb 20, 2024
@artemcm
Copy link
Contributor

artemcm commented Feb 20, 2024

We also have -Xclang-linker.
Is there a corresponding swift PR for this? Options here are kept up-to-date using this process, still:
https://github.com/apple/swift-driver?tab=readme-ov-file#rebuilding-optionsswift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded Changes related to Embedded Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants