[lld] [MachO LLD] Respect -all_load with --start-lib --end-lib style archives (PR #93993)

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 10:54:37 PDT 2024


================
@@ -1169,7 +1169,8 @@ static void createFiles(const InputArgList &args) {
 
     switch (opt.getID()) {
     case OPT_INPUT:
-      addFile(rerootPath(arg->getValue()), LoadType::CommandLine, isLazy);
+      addFile(rerootPath(arg->getValue()), LoadType::CommandLine,
+              isLazy && !config->allLoad);
----------------
kyulee-com wrote:

It's a bit confusing to override `isLazy` for each case. Instead, can we simply not set `isLazy` below in `case OPT_start_lib:` with `config->allLoad` ?

https://github.com/llvm/llvm-project/pull/93993


More information about the llvm-commits mailing list