From f3f0d389d84d935d9c954c40cd38b897a1e707da Mon Sep 17 00:00:00 2001 From: Bryan Thornbury Date: Thu, 19 Nov 2015 12:05:54 -0800 Subject: [PATCH] Add -Xlinker -lrt to fix issues with linking libSystem.Native.a, change --ilc-args to --ilcargs --- .../IntermediateCompilation/Linux/LinuxCppCompileStep.cs | 2 +- src/Microsoft.DotNet.Tools.Compiler/Program.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.DotNet.Tools.Compiler.Native/IntermediateCompilation/Linux/LinuxCppCompileStep.cs b/src/Microsoft.DotNet.Tools.Compiler.Native/IntermediateCompilation/Linux/LinuxCppCompileStep.cs index 4174c2008..3a016bab7 100644 --- a/src/Microsoft.DotNet.Tools.Compiler.Native/IntermediateCompilation/Linux/LinuxCppCompileStep.cs +++ b/src/Microsoft.DotNet.Tools.Compiler.Native/IntermediateCompilation/Linux/LinuxCppCompileStep.cs @@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native // TODO: debug/release support private readonly string cLibsFlags = "-lm -ldl"; - private readonly string cflags = "-g -lstdc++ -lrt -Wno-invalid-offsetof -pthread"; + private readonly string cflags = "-g -lstdc++ -lrt -Xlinker -lrt -Wno-invalid-offsetof -pthread"; private readonly string[] libs = new string[] { diff --git a/src/Microsoft.DotNet.Tools.Compiler/Program.cs b/src/Microsoft.DotNet.Tools.Compiler/Program.cs index 229eb04d1..90fbc0ea2 100644 --- a/src/Microsoft.DotNet.Tools.Compiler/Program.cs +++ b/src/Microsoft.DotNet.Tools.Compiler/Program.cs @@ -39,7 +39,7 @@ namespace Microsoft.DotNet.Tools.Compiler // Native Args var native = app.Option("-n|--native", "Compiles source to native machine code.", CommandOptionType.NoValue); var arch = app.Option("-a|--arch ", "The architecture for which to compile. x64 only currently supported.", CommandOptionType.SingleValue); - var ilcArgs = app.Option("--ilc-args ", "String to pass directory to ilc in native compilation.", CommandOptionType.SingleValue); + var ilcArgs = app.Option("--ilcargs ", "String to pass directory to ilc in native compilation.", CommandOptionType.SingleValue); var cppMode = app.Option("--cpp", "Flag to do native compilation with C++ code generator.", CommandOptionType.NoValue); app.OnExecute(() =>