diff options
author | Egor Chesakov <Egor.Chesakov@microsoft.com> | 2018-03-14 16:46:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 16:46:44 -0700 |
commit | ffc16020fee4d866de568042fe085143332a2159 (patch) | |
tree | 22d8c9232372987568ad1db133e80c58b7adbab0 | |
parent | 01fe8b7e9e04fdccf485f6c0399ee91dcb881c72 (diff) | |
download | coreclr-ffc16020fee4d866de568042fe085143332a2159.tar.gz coreclr-ffc16020fee4d866de568042fe085143332a2159.tar.bz2 coreclr-ffc16020fee4d866de568042fe085143332a2159.zip |
Include Linux/cross-arch components into NuGet packages (#16859)
* Add __DoCrossArchBuild settings to config.json
* HasCrossTargetComponents computes to 'true' on Linux when __DoCrossArchBuild is 1 in dir.props
* Include cross-architecture libclrjit.so crossgen into NuGet props files when HasCrossTargetComponents is 'true'
* Pass $__DoCrossArchBuild to run.sh when generating NuGet packages in build.sh
-rwxr-xr-x | build.sh | 2 | ||||
-rw-r--r-- | config.json | 6 | ||||
-rw-r--r-- | dir.props | 1 | ||||
-rw-r--r-- | src/.nuget/Microsoft.NETCore.Jit/runtime.Linux.Microsoft.NETCore.Jit.props | 1 | ||||
-rw-r--r-- | src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props | 1 |
5 files changed, 10 insertions, 1 deletions
@@ -477,7 +477,7 @@ generate_NugetPackages() echo "DistroRid is "$__DistroRid echo "ROOTFS_DIR is "$ROOTFS_DIR # Build the packages - $__ProjectRoot/run.sh build -Project=$__SourceDir/.nuget/packages.builds -MsBuildEventLogging="/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log" -MsBuildLog="/flp:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" -BuildTarget -__IntermediatesDir=$__IntermediatesDir -__RootBinDir=$__RootBinDir -BuildNugetPackage=false -UseSharedCompilation=false $__RunArgs $__UnprocessedBuildArgs + $__ProjectRoot/run.sh build -Project=$__SourceDir/.nuget/packages.builds -MsBuildEventLogging="/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log" -MsBuildLog="/flp:Verbosity=normal;LogFile=$__LogsDir/Nuget_$__BuildOS__$__BuildArch__$__BuildType.log" -BuildTarget -__IntermediatesDir=$__IntermediatesDir -__RootBinDir=$__RootBinDir -BuildNugetPackage=false -UseSharedCompilation=false -__DoCrossArchBuild=$__DoCrossArchBuild $__RunArgs $__UnprocessedBuildArgs if [ $? -ne 0 ]; then echo "Failed to generate Nuget packages." diff --git a/config.json b/config.json index 1927340cde..1725bc04a7 100644 --- a/config.json +++ b/config.json @@ -186,6 +186,12 @@ "values": [], "defaultValue": "" }, + "__DoCrossArchBuild": { + "description": "Specifies if we build cross-architecture components on Linux.", + "valueType": "property", + "values": [], + "defaultValue": "" + }, "GenerateVersionHeader": { "description": "Generates _version.h", "valueType": "passThrough", @@ -168,6 +168,7 @@ <!-- Define packaging attributes for cross target components --> <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents> + <HasCrossTargetComponents Condition="'$(TargetsLinux)' == 'true' and '$(PackagePlatform)' =='arm' and '$(__DoCrossArchBuild)' == '1'">true</HasCrossTargetComponents> <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder> <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder> diff --git a/src/.nuget/Microsoft.NETCore.Jit/runtime.Linux.Microsoft.NETCore.Jit.props b/src/.nuget/Microsoft.NETCore.Jit/runtime.Linux.Microsoft.NETCore.Jit.props index b92d11ae59..b00b1d024a 100644 --- a/src/.nuget/Microsoft.NETCore.Jit/runtime.Linux.Microsoft.NETCore.Jit.props +++ b/src/.nuget/Microsoft.NETCore.Jit/runtime.Linux.Microsoft.NETCore.Jit.props @@ -2,5 +2,6 @@ <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <NativeBinary Include="$(BinDir)libclrjit.so" /> + <CrossArchitectureSpecificNativeFileAndSymbol Condition="'$(HasCrossTargetComponents)' == 'true'" Include="$(BinDir)$(CrossTargetComponentFolder)\libclrjit.so" /> </ItemGroup> </Project> diff --git a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props index 69ebb80a0f..952e64550b 100644 --- a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props +++ b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props @@ -25,5 +25,6 @@ <NativeBinary Condition="'$(_PlatformDoesNotSupportCreatedump)' != 'true'" Include="$(BinDir)createdump" /> <ArchitectureSpecificLibFile Include="$(BinDir)SOS.NETCore.dll" /> <ArchitectureSpecificToolFile Include="$(BinDir)crossgen" /> + <CrossArchitectureSpecificToolFile Condition="'$(HasCrossTargetComponents)' == 'true'" Include="$(BinDir)$(CrossTargetComponentFolder)\crossgen" /> </ItemGroup> </Project> |