Pickup headers from ILCompiler.SDK

Add support for --cppcompilerflags switch to enable passing custom native compiler arguments.
This commit is contained in:
Gaurav Khanna 2015-12-20 20:46:28 -08:00
commit 0b2a6fee2e
13 changed files with 97 additions and 47 deletions

View file

@ -23,6 +23,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
var help = false;
string helpText = null;
var returnCode = 0;
string cppCompilerFlags = null;
IReadOnlyList<string> references = Array.Empty<string>();
IReadOnlyList<string> linklib = Array.Empty<string>();
@ -57,6 +58,9 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
// Optional Log Path
syntax.DefineOption("logpath", ref logPath, "Use to dump Native Compilation Logs to a file.");
// Optional flags to be passed to the native compiler
syntax.DefineOption("cppcompilerflags", ref cppCompilerFlags, "Additional flags to be passed to the native compiler.");
syntax.DefineOption("h|help", ref help, "Help for compile native.");
syntax.DefineParameter("INPUT_ASSEMBLY", ref inputAssembly,
@ -131,7 +135,8 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
IlcSdkPath = ilcSdkPath,
LinkLibPaths = linklib,
AppDepSDKPath = appDepSdk,
LogPath = logPath
LogPath = logPath,
CppCompilerFlags = cppCompilerFlags
};
}
}