[PATCH] D77087: [lld-macho] Only mock out libSystem.dylib loading in tests
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 12 20:50:56 PDT 2020
ruiu added inline comments.
================
Comment at: lld/MachO/Writer.cpp:357-361
+ if (StringRef(getenv("LLD_FORCE_LOAD_LIBSYSTEM")) == "1" &&
+ dylibOrdinal == 1 && config->outputType == MH_EXECUTE) {
+ headerSection->addLoadCommand(
+ make<LCLoadDylib>("/usr/lib/libSystem.B.dylib"));
+ }
----------------
I may be missing something, but doesn't this force lld to always link against /usr/lib/libSystem.B.dylib when it is ran in test, which will fail on non-macOS systems that don't have the dylib file?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77087/new/
https://reviews.llvm.org/D77087
More information about the llvm-commits
mailing list