COFF: Don't add /manifest* flags to the response file.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Oct 2017 05:00:54 +0000 (05:00 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 25 Oct 2017 05:00:54 +0000 (05:00 +0000)
If /manifest:embed is enabled we're already creating a resource file
out of these flags and adding it to the linkrepro, and it doesn't
seem worth being able to repro side-by-side manifests.

Includes a test that covers this commit as well as r315948.

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

llvm-svn: 316547

lld/COFF/Driver.cpp
lld/test/COFF/linkrepro-manifest.test [new file with mode: 0644]

index 804827c..94dfc31 100644 (file)
@@ -410,6 +410,12 @@ static std::string createResponseFile(const opt::InputArgList &Args,
     case OPT_INPUT:
     case OPT_defaultlib:
     case OPT_libpath:
+    case OPT_manifest:
+    case OPT_manifest_colon:
+    case OPT_manifestdependency:
+    case OPT_manifestfile:
+    case OPT_manifestinput:
+    case OPT_manifestuac:
       break;
     default:
       OS << toString(Arg) << "\n";
diff --git a/lld/test/COFF/linkrepro-manifest.test b/lld/test/COFF/linkrepro-manifest.test
new file mode 100644 (file)
index 0000000..dce4604
--- /dev/null
@@ -0,0 +1,12 @@
+REQUIRES: x86, gnutar, manifest_tool
+
+RUN: rm -rf %t && mkdir %t
+RUN: lld-link -entry:__ImageBase -nodefaultlib -linkrepro:%t -manifest:embed %p/Inputs/std32.lib -subsystem:console
+RUN: tar tf %t/repro.tar | FileCheck --check-prefix=LIST %s
+RUN: tar xOf %t/repro.tar repro/response.txt | FileCheck %s
+
+LIST: manifest.res
+
+CHECK-NOT: -manifest
+CHECK: .manifest.res
+CHECK-NOT: -manifest