[COFF] Warn that LLD does not support /PDBSTRIPPED:

Doesn't really fix PR44491, but it avoids treating it as an input.
This commit is contained in:
Reid Kleckner 2020-01-15 15:09:25 -08:00
parent 3d210ed3d1
commit 8045a8a7f1
3 changed files with 13 additions and 0 deletions

View File

@ -624,6 +624,7 @@ static std::string createResponseFile(const opt::InputArgList &args,
break;
case OPT_implib:
case OPT_pdb:
case OPT_pdbstripped:
case OPT_out:
os << arg->getSpelling() << sys::path::filename(arg->getValue()) << "\n";
break;
@ -1265,6 +1266,10 @@ void LinkerDriver::link(ArrayRef<const char *> argsArr) {
config->pdbSourcePath = arg->getValue();
}
// Handle /pdbstripped
if (auto *arg = args.getLastArg(OPT_pdbstripped))
warn("ignoring /pdbstripped flag, it is not yet supported");
// Handle /noentry
if (args.hasArg(OPT_noentry)) {
if (args.hasArg(OPT_dll))

View File

@ -64,6 +64,7 @@ def natvis : P<"natvis", "Path to natvis file to embed in the PDB">;
def no_color_diagnostics: F<"no-color-diagnostics">,
HelpText<"Do not use colors in diagnostics">;
def pdb : P<"pdb", "PDB file path">;
def pdbstripped : P<"pdbstripped", "Stripped PDB file path">;
def pdbaltpath : P<"pdbaltpath", "PDB file path to embed in the image">;
def section : P<"section", "Specify section attributes">;
def stack : P<"stack", "Size of the stack">;

View File

@ -0,0 +1,7 @@
# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /debug /pdb:%t.pdb /pdbstripped:%t2.pdb /pdbaltpath:test.pdb /dll /out:%t.dll \
# RUN: /entry:main /nodefaultlib %t1.obj %t2.obj 2>&1 | FileCheck %s
CHECK: warning: ignoring /pdbstripped flag, it is not yet supported