[lld] r205694 - [ELF] Accept "-rpath=<foo>" as well as "-rpath <foo>".
Rui Ueyama
ruiu at google.com
Sun Apr 6 14:23:24 PDT 2014
Author: ruiu
Date: Sun Apr 6 16:23:24 2014
New Revision: 205694
URL: http://llvm.org/viewvc/llvm-project?rev=205694&view=rev
Log:
[ELF] Accept "-rpath=<foo>" as well as "-rpath <foo>".
Modified:
lld/trunk/lib/Driver/GnuLdOptions.td
lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp
Modified: lld/trunk/lib/Driver/GnuLdOptions.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdOptions.td?rev=205694&r1=205693&r2=205694&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdOptions.td (original)
+++ lld/trunk/lib/Driver/GnuLdOptions.td Sun Apr 6 16:23:24 2014
@@ -133,8 +133,8 @@ def dynamic_linker : Joined<["--"], "dyn
// 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">,
Modified: lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp?rev=205694&r1=205693&r2=205694&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/GnuLdDriverTest.cpp Sun Apr 6 16:23:24 2014
@@ -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) {
More information about the llvm-commits
mailing list