[PATCH] D66848: [lld-link] implement -start-lib and -end-lib
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 19:03:46 PDT 2019
MaskRay added inline comments.
================
Comment at: lld/test/COFF/start-lib-cmd-diagnostics.ll:14
+
+; RUN: not lld-link -start-lib %t.obj -wholearchive:%t.obj 2>&1 \
+; RUN: | FileCheck --check-prefix=WHOLEARCHIVE %s
----------------
What made you decide -start-lib and -wholearchive: cannot be used together?
I noticed that -wholearchive: can apply on both archives and regular object files. However, there is no test before this patch that test -wholearchive: can apply on object files.
In ELF, the -wholearchive: counterpart is a pair of --whole-archive and --no-whole-archive. --start-lib is allowed to be used together because
* --start-lib applies on object files
* --whole-archive applies on archives
Their use cases don't overlap so their combination is not rejected.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66848/new/
https://reviews.llvm.org/D66848
More information about the llvm-commits
mailing list