michaeleisel / zld

A faster version of Apple's linker
MIT License
1.19k stars 50 forks source link

Quietly fall back to system ld for known cases where zld is not fully working #55

Closed michaeleisel closed 4 years ago

michaeleisel commented 4 years ago

The first one is pretty hard to fix without Apple deciding to open-source. The latter two I will figure out, if we have to, by just reverse-engineering the API.

One can force zld to be used through the new -force_zld flag however.

michaeleisel commented 4 years ago

@rmaz @steipete @kastiglione @milend let me know if this will make life easier, and if there are any issues with the dependency on python and default of system ld

kastiglione commented 4 years ago

seems reasonable to me. For Xcode 12, it might be easier to configure Xcode to not use zld, instead of have zld recognize it's being called via Xcode 12.

michaeleisel commented 4 years ago

yeah, it's tricky. but, i think this system will have nice long-term benefits too, e.g. for xcode 13

michaeleisel commented 4 years ago

for consumers, note that -zld_original_ld_path is also required, which if you're building with xcodebuild can just be $(DT_TOOLCHAIN_DIR)/usr/bin/ld. if you don't pass that flag, then behavior won't change from how it currently is