diff options
-rw-r--r-- | lld/lib/Driver/GnuLdOptions.td | 4 | ||||
-rw-r--r-- | lld/unittests/DriverTests/GnuLdDriverTest.cpp | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lld/lib/Driver/GnuLdOptions.td b/lld/lib/Driver/GnuLdOptions.td index 4c8d8f5901a..d062181bd3c 100644 --- a/lld/lib/Driver/GnuLdOptions.td +++ b/lld/lib/Driver/GnuLdOptions.td @@ -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">, diff --git a/lld/unittests/DriverTests/GnuLdDriverTest.cpp b/lld/unittests/DriverTests/GnuLdDriverTest.cpp index f1b63904e62..5f1ebafd523 100644 --- a/lld/unittests/DriverTests/GnuLdDriverTest.cpp +++ b/lld/unittests/DriverTests/GnuLdDriverTest.cpp @@ -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) { |