Add dotnet-compile-native linker script for Linux / OSX
Add CoreRT SDK linkerscript to linker options if the file is present. It is used for controlling section merging for multi-file compilation.
This commit is contained in:
parent
cf616770ca
commit
5a6de52383
2 changed files with 14 additions and 0 deletions
|
@ -70,6 +70,13 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
var ilcSdkLibPath = Path.Combine(config.IlcSdkPath, "sdk");
|
||||
argsList.AddRange(_ilcSdkLibs.Select(lib => Path.Combine(ilcSdkLibPath, lib)));
|
||||
|
||||
// Optional linker script
|
||||
var linkerScriptFile = Path.Combine(ilcSdkLibPath, "linkerscript");
|
||||
if (File.Exists(linkerScriptFile))
|
||||
{
|
||||
argsList.Add(linkerScriptFile);
|
||||
}
|
||||
|
||||
// AppDep Libs
|
||||
var baseAppDepLibPath = Path.Combine(config.AppDepSDKPath, "CPPSdk/ubuntu.14.04", config.Architecture.ToString());
|
||||
argsList.AddRange(_appdeplibs.Select(lib => Path.Combine(baseAppDepLibPath, lib)));
|
||||
|
|
|
@ -72,6 +72,13 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
var ilcSdkLibPath = Path.Combine(config.IlcSdkPath, "sdk");
|
||||
argsList.AddRange(_ilcSdkLibs.Select(lib => Path.Combine(ilcSdkLibPath, lib)));
|
||||
|
||||
// Optional linker script
|
||||
var linkerScriptFile = Path.Combine(ilcSdkLibPath, "linkerscript");
|
||||
if (File.Exists(linkerScriptFile))
|
||||
{
|
||||
argsList.Add(linkerScriptFile);
|
||||
}
|
||||
|
||||
// AppDep Libs
|
||||
var baseAppDepLibPath = Path.Combine(config.AppDepSDKPath, "CPPSdk/osx.10.10", config.Architecture.ToString());
|
||||
argsList.AddRange(appdeplibs.Select(lib => Path.Combine(baseAppDepLibPath, lib)));
|
||||
|
|
Loading…
Reference in a new issue