[lld] [LLD] [COFF] Add a separate option for allowing duplicate weak symbols (PR #68077)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 13:43:56 PDT 2023


================
@@ -1,4 +1,9 @@
 RUN: lld-link -lldmingw %S/Inputs/gnu-weak.o %S/Inputs/gnu-weak2.o -out:%t.exe
+RUN: lld-link -lld-allow-duplicate-weak %S/Inputs/gnu-weak.o %S/Inputs/gnu-weak2.o -out:%t.exe
+RUN: not lld-link %S/Inputs/gnu-weak.o %S/Inputs/gnu-weak2.o -out:%t.exe 2>&1 | FileCheck %s --check-prefix=DEFAULT-ERROR
+
+DEFAULT-ERROR: error: duplicate symbol: weakfunc
----------------
mstorsjo wrote:

There are more lines following this diagnostic (`defined at /path/to/object/file`), so I'll leave this as is.

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


More information about the llvm-commits mailing list