[ELF] Accept "-rpath=<foo>" as well as "-rpath <foo>".

llvm-svn: 205694
This commit is contained in:
Rui Ueyama 2014-04-06 21:23:24 +00:00
parent c141c8c59a
commit 595026e071
2 changed files with 9 additions and 2 deletions

View File

@ -133,8 +133,8 @@ def dynamic_linker : Joined<["--"], "dynamic-linker=">,
// Executable options - compatibility aliases
def dynamic_linker_alias : Separate<["-"], "dynamic-linker">,
Alias<dynamic_linker>;
def rpath : Separate<["-"], "rpath">,
HelpText<"Add a directory to the runtime library search path">,
defm rpath : dashEq<"rpath", "rpath",
"Add a directory to the runtime library search path">,
Group<grp_dynlibexec>;
def rpath_link : Separate<["-"], "rpath-link">,
HelpText<"Specifies the first set of directories to search">,

View File

@ -107,6 +107,13 @@ TEST_F(GnuLdParserTest, Rpath) {
EXPECT_EQ("bar", _context->getRpathList()[1]);
}
TEST_F(GnuLdParserTest, RpathEq) {
EXPECT_TRUE(parse("ld", "--start-group", "--end-group", "-rpath=foo",
nullptr));
EXPECT_EQ(1, _context->getRpathList().size());
EXPECT_EQ("foo", _context->getRpathList()[0]);
}
// --defsym
TEST_F(GnuLdParserTest, DefsymDecimal) {