Skip to content

[CMake][ELF] Remove lld 13 workaround for gc-sections now that #72061 was merged #73450

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

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

Conversation

finagolfin
Copy link
Member

@al45tair, one last build flag cleanup after your pull eliminating the need for this workaround.

@finagolfin
Copy link
Member Author

@kateinoigakukun, please run the CI.

@kateinoigakukun
Copy link
Member

Nice

@kateinoigakukun
Copy link
Member

@swift-ci test

@finagolfin
Copy link
Member Author

Hmm, the build log says -- GNU Gold is too old (2.34); using lld instead and since the host tools are still built with Swift 5.8.1 without the trunk ELF fix, lld cannot link with gc-sections and fails.

@al45tair, was it intentional to switch the linux CI over to using lld now or did this just happen without your knowing it, because of that CMake logic? Either way, we may have to wait on removing this flag until the prebuilt host toolchain on the linux CI has your ELF fix.

@al45tair
Copy link
Contributor

Gah. I made that change while trying to resolve the previous LLDB problems; it fixed one problem but it wasn't sufficient, so I had to fix the underlying problem in LLDB itself anyway. I left it in because it seemed like not a bad idea given that we're now shipping lld with the toolchain, but if it's a problem we could just disable that code for now (maybe it could just warn that you're using an old version of Gold, rather than changing to using LLD?)

@finagolfin
Copy link
Member Author

finagolfin commented May 10, 2024

It's no problem at all: I'm all for the switch to lld and Evan is planning to defer to whatever linker clang uses, swiftlang/swift-driver#1595.

I simply did not know that the linux CI had switched to lld, plus I always build the trunk toolchain for Android with the latest prebuilt trunk toolchain for linux, so I figured we could get rid of this flag.

However, we do support building the compiler with older toolchains, so best to put this on ice till your fix makes it into the prebuilt toolchain on the linux CI, marking this pull as draft till then.

@finagolfin finagolfin marked this pull request as draft May 10, 2024 10:20
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.

3 participants