The Wayback Machine - https://web.archive.org/web/20201016171729/https://github.com/ziglang/zig/pull/6650
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

stage2: enable incremental MachO linking #6650

Merged
merged 7 commits into from Oct 14, 2020
Merged

Conversation

@kubkon
Copy link
Member

@kubkon kubkon commented Oct 11, 2020

This PR enables basic incremental MachO linking. In other words, it is now possible to play with the biggest game changer of stage2 on a x86_64 mac like so:

../stage2/bin/zig build-exe test.zig --watch

Word of caution though that I haven't yet added handling of __text section growth meaning that if you apply too many growing changes, or add some rather beefy symbols, you will likely end up trapping at some point. I'm also not happy with handling of load command headers since we end up overwriting all at every change rather than only updating symbol and dynamic symbol tables for instance. This is to follow in a subsequent PR in the near future though ;-)

@kubkon kubkon changed the title stage2: enable incremental linking stage2: enable incremental MachO linking Oct 11, 2020
@kubkon kubkon requested a review from andrewrk Oct 11, 2020
@kubkon
Copy link
Member Author

@kubkon kubkon commented Oct 11, 2020

cc @joachimschmidt557. After watching your brilliant talk on ARM backend at Zig Showtime, I thought this might interest you ;-)

@joachimschmidt557
Copy link
Contributor

@joachimschmidt557 joachimschmidt557 commented Oct 11, 2020

@kubkon Thanks! I'll have a look. I'm sure I'm going to learn something new.

@kubkon kubkon force-pushed the kubkon:macho-incremental branch from f9d3709 to adfd298 Oct 13, 2020
Copy link
Member

@andrewrk andrewrk left a comment

Nice work!

@kubkon kubkon merged commit 68b31c5 into ziglang:master Oct 14, 2020
1 of 3 checks passed
1 of 3 checks passed
builds.hut.lavatech.top: freebsd.yml builds.sr.ht job failed
Details
ziglang.zig #20201013.6 failed
Details
continuous-integration/drone/pr Build is passing
Details
@kubkon kubkon deleted the kubkon:macho-incremental branch Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.