From ffc16020fee4d866de568042fe085143332a2159 Mon Sep 17 00:00:00 2001 From: Egor Chesakov Date: Wed, 14 Mar 2018 16:46:44 -0700 Subject: [PATCH] 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 --- build.sh | 2 +- config.json | 6 ++++++ dir.props | 1 + .../Microsoft.NETCore.Jit/runtime.Linux.Microsoft.NETCore.Jit.props | 1 + .../runtime.Linux.Microsoft.NETCore.Runtime.CoreCLR.props | 1 + 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 63be11b..51212f3 100755 --- a/build.sh +++ b/build.sh @@ -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 1927340..1725bc0 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", diff --git a/dir.props b/dir.props index a5623ab..ff30184 100644 --- a/dir.props +++ b/dir.props @@ -168,6 +168,7 @@ true + true x64 x86 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 b92d11a..b00b1d0 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 @@ + 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 69ebb80..952e645 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 @@ + -- 2.7.4