This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Use ld64 flag -lto_library instead of DYLD_LIBRARY_PATH
ClosedPublic

Authored by thakis on Apr 19 2022, 10:34 AM.

Details

Summary

Makes

bin/llvm-lit \

projects/compiler-rt/test/profile/Profile-arm64/instrprof-darwin-dead-strip.c

pass on my machine.

Without this change, ld64 complains that the bitcode was generated by LLVM 15
while the reader is 13.1 -- the version of Xcode on my machine. Looks like the
DYLD_LIBRARY_PATH technique isn't working.

-lto_library was added back in ld64-136, which was in Xcode 4.6, which was
released over 10 years ago. So relying on it should be safe by now.

Diff Detail

Event Timeline

thakis created this revision.Apr 19 2022, 10:34 AM
thakis requested review of this revision.Apr 19 2022, 10:34 AM
aeubanks accepted this revision.Apr 19 2022, 10:44 AM
This revision is now accepted and ready to land.Apr 19 2022, 10:44 AM
This revision was landed with ongoing or failed builds.Apr 19 2022, 10:55 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 10:55 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript