[lld] [LLD] [COFF] Add a separate option for allowing duplicate weak symbols (PR #68077)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 13:31:50 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
----------------
MaskRay wrote:
If this is the last line, consider adding `DEFAULT-ERROR-NOT: {{.}}` as a change detector when the diagnostic improves.
https://github.com/llvm/llvm-project/pull/68077
More information about the llvm-commits
mailing list