This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] ad-hoc sign dylibs and bundles on arm64 by default, support -(no_)adhoc_codesign flags
ClosedPublic

Authored by thakis on Mar 4 2021, 5:35 PM.

Details

Summary

Previously, lld/mac only ad-hoc codesigned executables on arm64.

Matches ld64 behavior. Part of PR49443. Fixes 14 of 17 failures when running
check-llvm with lld as host linker on an M1 MBP.

Diff Detail

Event Timeline

thakis created this revision.Mar 4 2021, 5:35 PM
Herald added a project: Restricted Project. · View Herald Transcript
thakis requested review of this revision.Mar 4 2021, 5:35 PM
gkm accepted this revision.Mar 4 2021, 9:45 PM
gkm added a subscriber: gkm.

LGTM

This revision is now accepted and ready to land.Mar 4 2021, 9:45 PM
This revision was landed with ongoing or failed builds.Mar 5 2021, 6:12 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2021, 6:12 AM
smeenai added inline comments.
lld/MachO/Driver.cpp
848

Should we be setting this for all arm64 binaries, or only arm64 binaries targeting macOS?

smeenai added inline comments.Mar 11 2021, 11:26 AM
lld/MachO/Driver.cpp
848

ld64 appears to only ad-hoc sign macOS binaries.