diff options
author | Simon Nattress <nattress@gmail.com> | 2017-02-25 06:02:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-25 06:02:18 +0300 |
commit | 573a673b049e896a009b0d1e2f5604618d5f8508 (patch) | |
tree | 2d17be99e86b837794d59e9ee08bb268acdc8587 /src/BuildIntegration | |
parent | 319b7a96388e05d9d907804bca4c32b51172ac8c (diff) |
Linux support for multi-module (#2807)
* Linux support for multi-module
* Alter build integration scripts to support different naming / tool invocations on Linux.
* Add GC / frame info for ELF to the same group as its associated method so it gets Comdat folded properly.
* Add -multimodule switch to runtest.sh to run tests against a shared pre-compiled framework library.
* Update ObjectWriter Nuget package which brings changes need to support Elf Comdat sections.
Diffstat (limited to 'src/BuildIntegration')
4 files changed, 11 insertions, 7 deletions
diff --git a/src/BuildIntegration/BuildFrameworkNativeObjects.proj b/src/BuildIntegration/BuildFrameworkNativeObjects.proj index 356b678a3..13e176131 100644 --- a/src/BuildIntegration/BuildFrameworkNativeObjects.proj +++ b/src/BuildIntegration/BuildFrameworkNativeObjects.proj @@ -29,11 +29,6 @@ <ItemGroup> <LibInputs Include="$(NativeIntermediateOutputPath)\*$(NativeObjectExt)" /> </ItemGroup> - - <PropertyGroup> - <SharedLibrary>$(FrameworkLibPath)\Framework.lib</SharedLibrary> - </PropertyGroup> - </Target> <Target Name="BuildOneFrameworkLibrary"> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props index a8d414e66..73b80ba78 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props @@ -20,6 +20,7 @@ See the LICENSE file in the project root for more information. <CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">clang-3.9</CppCompilerAndLinker> <CppCompiler>$(CppCompilerAndLinker)</CppCompiler> <CppLinker>$(CppCompilerAndLinker)</CppLinker> + <CppLibCreator>ar</CppLibCreator> </PropertyGroup> <ItemGroup> @@ -31,6 +32,7 @@ See the LICENSE file in the project root for more information. </ItemGroup> <ItemGroup> + <NativeLibrary Condition="'$(IlcMultiModule)' == 'true' and $(NativeCodeGen) == ''" Include="$(SharedLibrary)" /> <NativeLibrary Condition="$(NativeCodeGen) == ''" Include="$(IlcPath)/sdk/libbootstrapper.a" /> <NativeLibrary Condition="$(NativeCodeGen) == ''" Include="$(IlcPath)/sdk/libRuntime.a" /> <NativeLibrary Condition="$(NativeCodeGen) == 'cpp'" Include="$(IlcPath)/sdk/libbootstrappercpp.a" /> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props index 65df0c51b..633031bba 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Windows.props @@ -37,7 +37,7 @@ See the LICENSE file in the project root for more information. <NativeLibrary Condition="$(NativeCodeGen) == ''" Include="$(IlcPath)\sdk\Runtime.lib" /> <NativeLibrary Condition="$(NativeCodeGen) == 'cpp'" Include="$(IlcPath)\sdk\bootstrappercpp.lib" /> <NativeLibrary Condition="$(NativeCodeGen) == 'cpp'" Include="$(IlcPath)\sdk\PortableRuntime.lib" /> - <NativeLibrary Condition="'$(IlcMultiModule)' == 'true' and $(NativeCodeGen) == ''" Include="$(FrameworkLibPath)\Framework.lib" /> + <NativeLibrary Condition="'$(IlcMultiModule)' == 'true' and $(NativeCodeGen) == ''" Include="$(SharedLibrary)" /> </ItemGroup> <ItemGroup> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index cb57e8471..e2651db49 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -28,6 +28,8 @@ See the LICENSE file in the project root for more information. <PropertyGroup> <NativeObjectExt Condition="'$(TargetOS)' == 'Windows_NT'">.obj</NativeObjectExt> <NativeObjectExt Condition="'$(TargetOS)' != 'Windows_NT'">.o</NativeObjectExt> + <LibFileExt Condition="'$(TargetOS)' == 'Windows_NT'">.lib</LibFileExt> + <LibFileExt Condition="'$(TargetOS)' != 'Windows_NT'">.a</LibFileExt> <IlcOutputFileExt>$(NativeObjectExt)</IlcOutputFileExt> <IlcOutputFileExt Condition="$(NativeCodeGen) == 'cpp'">.cpp</IlcOutputFileExt> @@ -49,6 +51,9 @@ See the LICENSE file in the project root for more information. <FrameworkLibPath Condition="'$(FrameworkLibPath)' == ''">$(NativeOutputPath)</FrameworkLibPath> <FrameworkObjPath Condition="'$(FrameworkObjPath)' == ''">$(NativeIntermediateOutputPath)</FrameworkObjPath> + + <SharedLibrary Condition="'$(OS)' == 'Windows_NT'">$(FrameworkLibPath)\Framework$(LibFileExt)</SharedLibrary> + <SharedLibrary Condition="'$(OS)' != 'Windows_NT'">$(FrameworkLibPath)\libframework$(LibFileExt)</SharedLibrary> </PropertyGroup> <ItemGroup Condition="$(BuildingFrameworkLibrary) != 'true'"> @@ -158,11 +163,13 @@ See the LICENSE file in the project root for more information. DependsOnTargets="$(CreateLibDependsOn)"> <ItemGroup> + <CustomLibArg Include="/out:$(SharedLibrary)" Condition="'$(OS)' == 'Windows_NT'" /> + <CustomLibArg Include="-crs $(SharedLibrary)" Condition="'$(OS)' != 'Windows_NT'" /> <CustomLibArg Include="@(LibInputs->'%(Identity)')" /> - <CustomLibArg Include="/out:$(SharedLibrary)" /> </ItemGroup> <WriteLinesToFile File="$(NativeIntermediateOutputPath)lib.rsp" Lines="@(CustomLibArg)" Overwrite="true" Condition="'$(OS)' == 'Windows_NT'" /> <Exec Command="$(CppLibCreator) @"$(NativeIntermediateOutputPath)lib.rsp"" Condition="'$(OS)' == 'Windows_NT'" /> + <Exec Command="$(CppLibCreator) @(CustomLibArg, ' ')" Condition="'$(OS)' != 'Windows_NT'" /> </Target> </Project> |