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

Nuri Amari via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 12:01:53 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);
----------------
NuriAmari wrote:

Added a combination of the two, I like having an `inLib` variable to make it clear there's a difference between being inside `--start-lib` and actually loading lazily. 

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


More information about the llvm-commits mailing list