diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -313,6 +313,10 @@
else
add("-runtime-pseudo-reloc:no");
+ if (args.hasFlag(OPT_allow_multiple_definition,
+ OPT_no_allow_multiple_definition, false))
+ add("-force:multiple");
+
if (auto *a = args.getLastArg(OPT_icf)) {
StringRef s = a->getValue();
if (s == "all")
diff --git a/lld/MinGW/Options.td b/lld/MinGW/Options.td
--- a/lld/MinGW/Options.td
+++ b/lld/MinGW/Options.td
@@ -23,6 +23,9 @@
def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"
">,
HelpText<"Add a directory to the library search path">;
+defm allow_multiple_definition: B<"allow-multiple-definition",
+ "Allow multiple definitions",
+ "Do not allow multiple definitions (default)">;
def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">;
def Bstatic: F<"Bstatic">, HelpText<"Do not link against shared libraries">;
def disable_auto_import: F<"disable-auto-import">,
diff --git a/lld/test/MinGW/driver.test b/lld/test/MinGW/driver.test
--- a/lld/test/MinGW/driver.test
+++ b/lld/test/MinGW/driver.test
@@ -260,3 +260,11 @@
RUN: ld.lld -### -m i386pe foo.o -no-seh | FileCheck -check-prefix NOSEH %s
RUN: ld.lld -### -m i386pe foo.o --no-seh | FileCheck -check-prefix NOSEH %s
NOSEH: -noseh
+
+RUN: ld.lld -### -m i386pep foo.o --no-allow-multiple-definition --allow-multiple-definition | FileCheck -check-prefix ALLOW_MULTIPLE_DEFINITION %s
+RUN: ld.lld -### -m i386pep foo.o -no-allow-multiple-definition -allow-multiple-definition | FileCheck -check-prefix ALLOW_MULTIPLE_DEFINITION %s
+ALLOW_MULTIPLE_DEFINITION: -force:multiple
+
+RUN: ld.lld -### -m i386pep foo.o --allow-multiple-definition --no-allow-multiple-definition | FileCheck -check-prefix NO_ALLOW_MULTIPLE_DEFINITION %s
+RUN: ld.lld -### -m i386pep foo.o -allow-multiple-definition -no-allow-multiple-definition | FileCheck -check-prefix NO_ALLOW_MULTIPLE_DEFINITION %s
+NO_ALLOW_MULTIPLE_DEFINITION-NOT: -force:multiple