From e7a67bf8ceb08d830fbc7bb05b429697a3a0c777 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 9 Jul 2019 13:30:03 +0000 Subject: [PATCH] lld-link: Stop accepting /natvis and /fastfail in .drectve sections link.exe doesn't accept them either. Differential Revision: https://reviews.llvm.org/D64352 llvm-svn: 365478 --- lld/COFF/Driver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 415715415188..6a95fafbbb5c 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -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: