[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 11:23:30 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:
Got it. Using another variable seems clearer to me.
```
case OPT_start_lib:
if (inLib)
error("nested --start-lib");
inLib = true;
if (!config->allLoad)
isLazy = true;
break;
case OPT_end_lib:
if (!inLib)
error("stray --end-lib");
inLib = false;
if (!config->allLoad)
isLazy = false;
break;
```
https://github.com/llvm/llvm-project/pull/93993
More information about the llvm-commits
mailing list