[lld] wasm-ld: Add allow-multiple-definition flag (PR #97699)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 14:01:26 PDT 2024
================
@@ -319,9 +319,12 @@ static bool shouldReplace(const Symbol *existing, InputFile *newFile,
}
// Neither symbol is week. They conflict.
- error("duplicate symbol: " + toString(*existing) + "\n>>> defined in " +
- toString(existing->getFile()) + "\n>>> defined in " +
- toString(newFile));
+ if (config->allowMultipleDefinition) {
+ return false;
----------------
MaskRay wrote:
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
https://github.com/llvm/llvm-project/pull/97699
More information about the llvm-commits
mailing list