lld-link: Stop accepting /natvis and /fastfail in .drectve sections
authorNico Weber <nicolasweber@gmx.de>
Tue, 9 Jul 2019 13:30:03 +0000 (13:30 +0000)
committerNico Weber <nicolasweber@gmx.de>
Tue, 9 Jul 2019 13:30:03 +0000 (13:30 +0000)
link.exe doesn't accept them either.

Differential Revision: https://reviews.llvm.org/D64352

llvm-svn: 365478

lld/COFF/Driver.cpp

index 4157154..6a95faf 100644 (file)
@@ -365,10 +365,10 @@ void LinkerDriver::parseDirectives(InputFile *File) {
       parseSubsystem(Arg->getValue(), &Config->Subsystem,
                      &Config->MajorOSVersion, &Config->MinorOSVersion);
       break;
+    // Only add flags here that link.exe accepts in
+    // `#pragma comment(linker, "/flag")`-generated sections.
     case OPT_editandcontinue:
-    case OPT_fastfail:
     case OPT_guardsym:
-    case OPT_natvis:
     case OPT_throwingnew:
       break;
     default: