Index: MinGW/Driver.cpp =================================================================== --- MinGW/Driver.cpp +++ MinGW/Driver.cpp @@ -152,6 +152,8 @@ Add("-verbose"); if (Args.hasArg(OPT_export_all_symbols)) Add("-export-all-symbols"); + if (Args.hasArg(OPT_lldmap)) + Add("-lldmap"); if (auto *A = Args.getLastArg(OPT_m)) { StringRef S = A->getValue(); Index: MinGW/Options.td =================================================================== --- MinGW/Options.td +++ MinGW/Options.td @@ -31,6 +31,7 @@ // LLD specific options def _HASH_HASH_HASH : Flag<["-"], "###">, HelpText<"Print (but do not run) the commands to run for this compilation">; +def lldmap : F<"lldmap">; // Currently stubs to avoid errors def Bdynamic: F<"Bdynamic">, HelpText<"Link against shared libraries">; Index: test/MinGW/driver.test =================================================================== --- test/MinGW/driver.test +++ test/MinGW/driver.test @@ -79,3 +79,6 @@ RUN: ld.lld -### -m i386pep foo.o --output-def out.def | FileCheck -check-prefix OUTPUT-DEF %s OUTPUT-DEF: -output-def:out.def + +RUN: ld.lld -### -m i386pep foo.o -lldmap | FileCheck -check-prefix LLDMAP %s +LLDMAP: -lldmap