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

std.Target: Rewrite DynamicLinker.standard() and fill in some missing details. #21037

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Aug 12, 2024

I went and collected all the known dynamic linker paths from GCC, Clang, and a few other places online, and then rewrote this function. Also moved some OS prongs for which I concluded with a reasonable degree of confidence that the OS doesn't have a standard dynamic linker path.

Recommend reviewing this one by just looking at the new implementation rather than the diff.

(Almost all of the ABI-related TODOs I'm adding here can be addressed by #20690.)

@alexrp alexrp marked this pull request as draft August 12, 2024 01:06
@alexrp alexrp force-pushed the target-dyld branch 2 times, most recently from d02cd6c to 4d9fc0a Compare August 13, 2024 03:38
@alexrp alexrp marked this pull request as ready for review August 13, 2024 03:38
lib/std/Target.zig Outdated Show resolved Hide resolved
@alexrp alexrp force-pushed the target-dyld branch 4 times, most recently from 6215e47 to 34f1726 Compare August 16, 2024 05:55
@alexrp alexrp force-pushed the target-dyld branch 2 times, most recently from ea47605 to 81cbb64 Compare August 28, 2024 00:57
@alexrp alexrp force-pushed the target-dyld branch 2 times, most recently from 0af24ba to 2194966 Compare September 3, 2024 15:51
Copy link
Contributor

@linusg linusg left a comment

Choose a reason for hiding this comment

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

LGTM, good TODO comments 👍

@alexrp
Copy link
Member Author

alexrp commented Sep 13, 2024

Speaking of TODOs, @andrewrk would you prefer that I remove them and just list out the missing bits in an issue, or is it fine to keep them on the understanding that, once implemented, #20690 will address them?

@alexrp
Copy link
Member Author

alexrp commented Oct 5, 2024

  • Rebased and resolved conflicts.
  • Addressed a few TODOs.
  • Removed some TODOs that will fall out automatically when we update to LLVM 20.
  • Remaining TODOs will either be addressed by RFC/Proposal: Turning Zig target triples into quadruples #20690, or in some cases by a follow-up PR that adds a few more Cpu.Arch tags, or with LLVM 20 (MIPS N32 for musl).

@alexrp
Copy link
Member Author

alexrp commented Oct 6, 2024

or in some cases by a follow-up PR that adds a few more Cpu.Arch tags

Will address these after merging.

@alexrp alexrp merged commit 516cb5a into ziglang:master Oct 6, 2024
10 checks passed
@alexrp alexrp deleted the target-dyld branch October 6, 2024 08:33
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.

2 participants