Patch by Alberto Magni
Original patch by Kyungwoo Lee <kyulee@microsoft.com>
Differential Revision: https://reviews.llvm.org/D31388
llvm-svn: 299106
// Parse command line options.
opt::InputArgList Args = Parser.parseLINK(ArgsArr.slice(1));
+ // Parse and evaluate -mllvm options.
+ std::vector<const char *> V;
+ V.push_back("lld-link (LLVM option parsing)");
+ for (auto *Arg : Args.filtered(OPT_mllvm))
+ V.push_back(Arg->getValue());
+ cl::ParseCommandLineOptions(V.size(), V.data());
+
// Handle /help
if (Args.hasArg(OPT_help)) {
printHelp(ArgsArr[0]);
--- /dev/null
+; REQUIRES: x86
+; RUN: llvm-as %s -o %t.obj
+; RUN: lld-link /dll /out:%t.dll %t.obj /mllvm:-debug-pass=Arguments 2>&1 | FileCheck %s
+
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-pc-windows-msvc"
+
+define void @dummy() {
+ ret void
+}
+
+define void @_DllMainCRTStartup() {
+ ret void
+}
+
+; CHECK: Pass Arguments: