[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 10:58:23 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:

I thought about that, but that would break the diagnostic that warns against nested `--start-lib`, which seems useful to maintain. We can introduce another variable specifically to track if we already have a `--start-lib` if that's preferred.

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


More information about the llvm-commits mailing list