[lld] [LLD][COFF] Handle --start-lib/--end-lib group in the same way as other archives (PR #136496)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 16:08:55 PDT 2025
================
@@ -2553,9 +2595,11 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
if (args.hasArg(OPT_include_optional)) {
// Handle /includeoptional
- for (auto *arg : args.filtered(OPT_include_optional))
- if (isa_and_nonnull<LazyArchive>(symtab.find(arg->getValue())))
+ for (auto *arg : args.filtered(OPT_include_optional)) {
+ Symbol *sym = ctx.symtab.find(arg->getValue());
+ if (sym && (isa<LazyArchive>(sym) || isa<LazyObject>(sym)))
----------------
cjacek wrote:
It would be good to have a test case for that.
https://github.com/llvm/llvm-project/pull/136496
More information about the llvm-commits
mailing list