Skip to content

Conversation

@LuckyXu-HF
Copy link
Contributor

Fix the build error of the NativeAOT smoke tests which is mentioned in #104661 (comment)

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 14, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 14, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@LuckyXu-HF
Copy link
Contributor Author

This commit fixed the building of NAOT smoke tests which is mentioned in #104661 (comment) :

Another issue is, while compiling smoke tests SharedLibrary, it will report errors like
ld.lld : error : relocation R_LARCH_PCALA_LO12 cannot be used against symbol 'memmove'; recompile with -fPIC [runtime/src/tests/nativeaot/SmokeTests/SharedLibrary/SharedLibrary.csproj] [runtime/src/tests/build.proj].

The ld.bfd should report errors when linking illegal symbol, but it doesn't, we have reported this to the LD team.
And the ld.lld behavior of reporting errors is what we expect.

@LuckyXu-HF
Copy link
Contributor Author

Hi @shushanhf @jakobbotsch , could you please review this PR? Thanks.

@am11
Copy link
Member

am11 commented Apr 14, 2025

Nice!

The ld.bfd should report errors when linking illegal symbol, but it doesn't, we have reported this to the LD team.

My takeaway from reading a few posts on https://maskray.me/blog/, there's no perfect linker; it's a balance between best effort to unblock people and nitpicking on what constitutes illegal. So it pays to collect diagnostics from both lld and bfd (and if feasible, gold and mold too) and aim to make all of them happy. 😅

Copy link
Contributor

@shushanhf shushanhf left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks

@LuckyXu-HF
Copy link
Contributor Author

Hi @jakobbotsch @jkotas could you please help to review this PR? Thanks.

@jkotas
Copy link
Member

jkotas commented Apr 17, 2025

/ba-g DeadLetter

@jkotas jkotas merged commit ff61917 into dotnet:main Apr 17, 2025
111 of 114 checks passed
@LuckyXu-HF LuckyXu-HF deleted the main-LA64 branch April 18, 2025 00:58
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-loongarch64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants