Index: MinGW/Options.td =================================================================== --- MinGW/Options.td +++ MinGW/Options.td @@ -54,6 +54,11 @@ def require_defined: S<"require-defined">, HelpText<"Force symbol to be added to symbol table as an undefined one">; def require_defined_eq: J<"require-defined=">, Alias; +// Strictly taken, the -u option allows for the symbol to remain undefined, +// which this currently doesn't. +def undefined: S<"u">, Alias; +def undefined_long: S<"undefined">, Alias; +def undefined_eq: J<"undefined=">, Alias; // LLD specific options def _HASH_HASH_HASH : Flag<["-"], "###">, Index: test/MinGW/driver.test =================================================================== --- test/MinGW/driver.test +++ test/MinGW/driver.test @@ -155,6 +155,7 @@ MAP: -lldmap:bar.map RUN: ld.lld -### foo.o -m i386pe -require-defined _foo --require-defined _bar -require-defined=_baz --require-defined=_foo2 | FileCheck -check-prefix=REQUIRE-DEFINED %s +RUN: ld.lld -### foo.o -m i386pe -u _foo --undefined _bar -undefined=_baz --undefined=_foo2 | FileCheck -check-prefix=REQUIRE-DEFINED %s REQUIRE-DEFINED: -include:_foo -include:_bar -include:_baz -include:_foo2 RUN: ld.lld -### -m i386pep foo.o -Llibpath | FileCheck -check-prefix LIBPATH %s