Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lld/MinGW/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
add("-errorlimit:" + s);
}

if (auto *a = args.getLastArg(OPT_rpath))
warn("parameter " + a->getSpelling() + " has no effect on PE/COFF targets");

for (auto *a : args.filtered(OPT_mllvm))
add("-mllvm:" + StringRef(a->getValue()));

Expand Down
3 changes: 3 additions & 0 deletions lld/MinGW/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ defm: EqNoHelp<"sysroot">;
def: F<"sort-common">;
def: F<"start-group">;

// Ignored options, that produce warnings
defm rpath: EqNoHelp<"rpath">;

// Ignore GCC collect2 LTO plugin related options. Note that we don't support
// GCC LTO, but GCC collect2 passes these options even in non-LTO mode.
def: J<"plugin-opt=-fresolution=">;
Expand Down
6 changes: 6 additions & 0 deletions lld/test/MinGW/driver.test
Original file line number Diff line number Diff line change
Expand Up @@ -446,3 +446,9 @@ RUN: ld.lld -### foo.o -m i386pep --build-id=none 2>&1 | FileCheck -check-prefix
RUN: ld.lld -### foo.o -m i386pep -s 2>&1 | FileCheck -check-prefix=NO_BUILD_ID %s
RUN: ld.lld -### foo.o -m i386pep -S 2>&1 | FileCheck -check-prefix=NO_BUILD_ID %s
NO_BUILD_ID: -build-id:no

RUN: ld.lld -### foo.o -m i386pep -rpath foo 2>&1 | FileCheck -check-prefix=WARN_RPATH %s
RUN: ld.lld -### foo.o -m i386pep --rpath foo 2>&1 | FileCheck -check-prefix=WARN_RPATH %s
RUN: ld.lld -### foo.o -m i386pep -rpath=foo 2>&1 | FileCheck -check-prefix=WARN_RPATH %s
RUN: ld.lld -### foo.o -m i386pep --rpath=foo 2>&1 | FileCheck -check-prefix=WARN_RPATH %s
WARN_RPATH: warning: parameter -{{-?}}rpath has no effect on PE/COFF targets