Skip to content

Conversation

@omajid
Copy link
Member

@omajid omajid commented Nov 16, 2021

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
Copy link
Member

am11 commented Nov 16, 2021

Looks good to me as it is. :)

@janvorli
Copy link
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.

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Copy link
Member

@janvorli janvorli left a comment

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
Copy link
Member Author

omajid commented Nov 22, 2021

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
Copy link
Member Author

omajid commented Nov 22, 2021

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