aboutsummaryrefslogtreecommitdiff
path: root/MinGW
diff options
context:
space:
mode:
authorMartell Malone <martellmalone@gmail.com>2017-09-11 21:36:37 +0000
committerMartell Malone <martellmalone@gmail.com>2017-09-11 21:36:37 +0000
commitbb271cef9303a52dcd6d28c05105a4fb1ba956d9 (patch)
tree924e961898da725936e7647b9a242f084e9ba6e6 /MinGW
parent9180a6e086c5bb29d3969bebf5fde53792c61eb9 (diff)
LLD: Add -mllvm flag to the MinGW driver.
This adds support for passing LTO flags to the MINGW driver in GNU LD style i.e. -mllvm flag -> /mllvm:flag Reviewers: ruiu, mstorsjo Differential Revision: https://reviews.llvm.org/D37712 git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@312956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'MinGW')
-rw-r--r--MinGW/Driver.cpp3
-rw-r--r--MinGW/Options.td1
2 files changed, 4 insertions, 0 deletions
diff --git a/MinGW/Driver.cpp b/MinGW/Driver.cpp
index 404452bdd..7d46d877d 100644
--- a/MinGW/Driver.cpp
+++ b/MinGW/Driver.cpp
@@ -160,6 +160,9 @@ bool link(ArrayRef<const char *> ArgsArr, raw_ostream &Diag) {
error("unknown parameter: -m" + S);
}
+ for (auto *A : Args.filtered(OPT_mllvm))
+ Add("-mllvm:" + StringRef(A->getValue()));
+
if (Args.getLastArgValue(OPT_m) == "i386pe")
Add("-alternatename:__image_base__=___ImageBase");
else
diff --git a/MinGW/Options.td b/MinGW/Options.td
index f6f807989..74055770a 100644
--- a/MinGW/Options.td
+++ b/MinGW/Options.td
@@ -11,6 +11,7 @@ def entry: S<"entry">, MetaVarName<"<entry>">,
def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
HelpText<"Root name of library to use">;
def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">;
+def mllvm: S<"mllvm">;
def o: JoinedOrSeparate<["-"], "o">, MetaVarName<"<path>">,
HelpText<"Path to file to write output">;
def out_implib: Separate<["--"], "out-implib">, HelpText<"Import library name">;