Add support for LLVM -mllvm parameter

The -mllvm parameter is used to pass options to the LLVM component
through the Clang command line. As it assumes that the following
option contains the parameter that needs to be passed to LLVM,
cannot be handled like any other "-m" option.

Change-Id: I6d0347414f891d14238875158f9c5fc689907ccf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Antonio Di Monaco
2019-07-12 10:34:59 +02:00
parent b7a96a9342
commit 36566a5015

View File

@@ -382,7 +382,7 @@ ToolChain::MacroInspectionRunner GccToolChain::createMacroInspectionRunner() con
if (++iArg < allFlags.length() && !arguments.contains(a))
arguments << a << allFlags.at(iArg);
} else if (a == "--sysroot" || a == "-isysroot" || a == "-D" || a == "-U"
|| a == "-gcc-toolchain" || a == "-target") {
|| a == "-gcc-toolchain" || a == "-target" || a == "-mllvm") {
if (++iArg < allFlags.length())
arguments << a << allFlags.at(iArg);
} else if (a.startsWith("-m") || a == "-Os" || a == "-O0" || a == "-O1" || a == "-O2"