Differential Revision: https://reviews.llvm.org/D51840
llvm-svn: 341846
else
Add("-alternatename:__image_base__=__ImageBase");
+ for (auto *A : Args.filtered(OPT_require_defined))
+ Add("-include:" + StringRef(A->getValue()));
+
std::vector<StringRef> SearchPaths;
for (auto *A : Args.filtered(OPT_L))
SearchPaths.push_back(A->getValue());
def whole_archive: F<"whole-archive">,
HelpText<"Include all object files for following archives">;
def verbose: F<"verbose">, HelpText<"Verbose mode">;
+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<require_defined>;
// LLD specific options
def _HASH_HASH_HASH : Flag<["-"], "###">,
RUN: ld.lld -### foo.o -m i386pep -Map=bar.map | FileCheck -check-prefix=MAP %s
RUN: ld.lld -### foo.o -m i386pep --Map=bar.map | FileCheck -check-prefix=MAP %s
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
+REQUIRE-DEFINED: -include:_foo -include:_bar -include:_baz -include:_foo2