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

macho: upstream zld linker #8282

Merged
merged 25 commits into from Mar 18, 2021
Merged

macho: upstream zld linker #8282

merged 25 commits into from Mar 18, 2021

Conversation

kubkon
Copy link
Member

@kubkon kubkon commented Mar 17, 2021

This PR is upstreaming zld, the traditional linker, as a drop-in replacement for LLD when targeting MachO. zld is now currently used by default when cross-compiling Zig and C (C++ to join the club soon-ish), and it's the default linker for aarch64. This is a bold step, but @andrewrk and myself believe definitely worth a try even though zld is not fully functional yet and bugs are to be expected. However, we do believe this way we'll get bugs weed out much quicker and thus progress the linker development much faster. Also, a bonus for using zld is the fact that TLV is finally properly handled on Apple Silicon in Zig!

Fixes #8216
Fixes #7527
Fixes #6971

@kubkon kubkon added os-macos frontend Tokenization, parsing, AstGen, Sema, and Liveness. stage1 The process of building from source via WebAssembly and the C backend. arch-x86_64 arch-aarch64 64-bit ARM labels Mar 17, 2021
@kubkon
Copy link
Member Author

kubkon commented Mar 18, 2021

I just wanted to point out that we pass all tests on Apple Silicon with the exception of a few standalone tests producing or linking against shared libraries, and there seems to be an issue with alignment when running translate-c test suite. Apart from that, we are green with the rest of the test suite!

@kubkon kubkon merged commit 17c066e into ziglang:master Mar 18, 2021
@kubkon kubkon deleted the zld branch March 18, 2021 18:14
kivikakk added a commit to kivikakk/libpcre.zig that referenced this pull request Mar 25, 2021
ziglang/zig#8282 has changed how this works and it breaks right now.
kivikakk added a commit to kivikakk/koino that referenced this pull request Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-aarch64 64-bit ARM arch-x86_64 frontend Tokenization, parsing, AstGen, Sema, and Liveness. os-macos stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
1 participant