Skip to content

Support using unversioned lld as linker too - #8189

Merged
janvorli merged 2 commits into
dotnet:mainfrom
omajid:arm64-unversioned-lld-binary
Nov 22, 2021
Merged

janvorli merged 2 commits into
dotnet:mainfrom
omajid:arm64-unversioned-lld-binary

Conversation

@omajid

@omajid omajid commented Nov 16, 2021

Copy link
Copy Markdown
Member

On Fedora and RHEL the lld executable is the plain unversioned lld. That's also usable as a linker if it's recent enough.

See dotnet/runtime#58959 (comment)
for more details and discussion.

We have been carrying the 6.0 version of this patch for RHEL 8 on arm64 here: https://git.centos.org/rpms/dotnet6.0/blob/c8s/f/SOURCES/runtime-arm64-lld-fix.patch

There was an open question about parsing the lld version using clang like so:

$ clang -fuse-ld=lld -Wl,--version
LLD 13.0.0 (compatible with GNU linkers)

Is that worth implementing?

cc @am11 @crummel @janvorli

On Fedora and RHEL the `lld` executable is the plain unversioned `lld`.
That's also usable as a linker if it's recent enough.

See dotnet/runtime#58959 (comment)
for more details and discussion.
@am11

am11 commented Nov 16, 2021

Copy link
Copy Markdown
Member

Looks good to me as it is. :)

@janvorli

Copy link
Copy Markdown
Member

I think that checking for lld via clang is a better way. We never execute lld directly, so we really care about the one that clang selects by itself. Especially when you have multiple clang / lld versions installed (like I do). Clang seems to always pick lld of the same version.
If you call just lld, above, there is no guarantee that the lld will be seen by clang.

Comment thread eng/common/native/init-compiler.sh Resolved

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!

@omajid omajid changed the title Support using unversioend lld as linker too Support using unversioned lld as linker too Nov 16, 2021
@omajid

omajid commented Nov 22, 2021 •

Copy link
Copy Markdown
Member Author

If this looks good to everyone, can someone please merge this? I dont have merge powers.

@janvorli
janvorli merged commit 9a3b642 into dotnet:main Nov 22, 2021
@omajid

omajid commented Nov 22, 2021

Copy link
Copy Markdown
Member Author

Thanks!

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