diff --git a/build.cmd b/build.cmd
index b07afe52bf66..a7507e505b93 100644
--- a/build.cmd
+++ b/build.cmd
@@ -658,7 +658,16 @@ if %__BuildCoreLib% EQU 1 (
if "%__BuildManagedTools%" == "1" (
echo %__MsgPrefix%Publishing crossgen2...
- call %__ProjectDir%\dotnet.cmd publish --self-contained -r win-%__BuildArch% -c %__BuildType% -o "%__BinDir%\crossgen2" "%__ProjectDir%\src\tools\crossgen2\crossgen2\crossgen2.csproj"
+ call %__ProjectDir%\dotnet.cmd publish --self-contained -r win-%__BuildArch% -c %__BuildType% -o "%__BinDir%\crossgen2" "%__ProjectDir%\src\tools\crossgen2\crossgen2\crossgen2.csproj" /p:BuildArch=%__BuildArch%
+
+ if not !errorlevel! == 0 (
+ echo %__ErrMsgPrefix%%__MsgPrefix%Error: Failed to build crossgen2.
+ echo !__BuildLog!
+ echo !__BuildWrn!
+ echo !__BuildErr!
+ exit /b !errorlevel!
+ )
+
copy /Y "%__BinDir%\clrjit.dll" "%__BinDir%\crossgen2\clrjitilc.dll"
copy /Y "%__BinDir%\jitinterface.dll" "%__BinDir%\crossgen2\jitinterface.dll"
)
diff --git a/build.sh b/build.sh
index cad8094726b9..5621c02ca7e2 100755
--- a/build.sh
+++ b/build.sh
@@ -444,7 +444,13 @@ build_CoreLib()
if [[ "$__BuildManagedTools" -eq "1" ]]; then
echo "Publishing crossgen2 for $__DistroRid"
- "$__ProjectRoot/dotnet.sh" publish --self-contained -r $__DistroRid -c $__BuildType -o "$__BinDir/crossgen2" "$__ProjectRoot/src/tools/crossgen2/crossgen2/crossgen2.csproj"
+ "$__ProjectRoot/dotnet.sh" publish --self-contained -r $__DistroRid -c $__BuildType -o "$__BinDir/crossgen2" "$__ProjectRoot/src/tools/crossgen2/crossgen2/crossgen2.csproj" /p:BuildArch=$__BuildArch
+
+ local exit_code=$?
+ if [ $exit_code != 0 ]; then
+ echo "${__ErrMsgPrefix}Failed to build crossgen2."
+ exit $exit_code
+ fi
if [ "$__HostOS" == "OSX" ]; then
cp "$__BinDir/libclrjit.dylib" "$__BinDir/crossgen2/libclrjitilc.dylib"
diff --git a/src/.nuget/Microsoft.NETCore.Crossgen2/Microsoft.NETCore.Crossgen2.builds b/src/.nuget/Microsoft.NETCore.Crossgen2/Microsoft.NETCore.Crossgen2.builds
new file mode 100644
index 000000000000..85918b379ead
--- /dev/null
+++ b/src/.nuget/Microsoft.NETCore.Crossgen2/Microsoft.NETCore.Crossgen2.builds
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/.nuget/Microsoft.NETCore.Crossgen2/Microsoft.NETCore.Crossgen2.pkgproj b/src/.nuget/Microsoft.NETCore.Crossgen2/Microsoft.NETCore.Crossgen2.pkgproj
new file mode 100644
index 000000000000..bd4cc28d8e1e
--- /dev/null
+++ b/src/.nuget/Microsoft.NETCore.Crossgen2/Microsoft.NETCore.Crossgen2.pkgproj
@@ -0,0 +1,42 @@
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+{
+ "runtimeOptions": {
+ "tfm": "netcoreapp3.0",
+ "framework": {
+ "name": "Microsoft.NETCore.App",
+ "version": "5.0.0-alpha1.0"
+ }
+ }
+}
+
+ $(ArtifactsObjDir)crossgen2\crossgen2.runtimeconfig.json
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/.nuget/Microsoft.NETCore.Crossgen2/runtime.Linux.Microsoft.NETCore.Crossgen2.props b/src/.nuget/Microsoft.NETCore.Crossgen2/runtime.Linux.Microsoft.NETCore.Crossgen2.props
new file mode 100644
index 000000000000..24e45ab5487d
--- /dev/null
+++ b/src/.nuget/Microsoft.NETCore.Crossgen2/runtime.Linux.Microsoft.NETCore.Crossgen2.props
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/.nuget/Microsoft.NETCore.Crossgen2/runtime.Windows_NT.Microsoft.NETCore.Crossgen2.props b/src/.nuget/Microsoft.NETCore.Crossgen2/runtime.Windows_NT.Microsoft.NETCore.Crossgen2.props
new file mode 100644
index 000000000000..67cda6514704
--- /dev/null
+++ b/src/.nuget/Microsoft.NETCore.Crossgen2/runtime.Windows_NT.Microsoft.NETCore.Crossgen2.props
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/.nuget/descriptions.json b/src/.nuget/descriptions.json
index cde4d35416e5..0ab63e6c4d73 100644
--- a/src/.nuget/descriptions.json
+++ b/src/.nuget/descriptions.json
@@ -45,8 +45,13 @@
"CommonTypes": [ ]
},
{
- "Name": "Microsoft.NETCore.Native",
- "Description": "Native shims for .NET Core runtime",
- "CommonTypes": [ ]
+ "Name": "Microsoft.NETCore.Native",
+ "Description": "Native shims for .NET Core runtime",
+ "CommonTypes": [ ]
+ },
+ {
+ "Name": "Microsoft.NETCore.Crossgen2",
+ "Description": "The .NET Crossgen2 compiler.",
+ "CommonTypes": [ ]
}
]
diff --git a/src/.nuget/packages.builds b/src/.nuget/packages.builds
index 080583950a7b..883d9c7a9829 100644
--- a/src/.nuget/packages.builds
+++ b/src/.nuget/packages.builds
@@ -22,6 +22,10 @@
+
+
+
+
diff --git a/src/build.proj b/src/build.proj
index 02dc506244fc..4cf380346a27 100644
--- a/src/build.proj
+++ b/src/build.proj
@@ -10,7 +10,6 @@
-
diff --git a/src/tools/crossgen2/ILCompiler.DependencyAnalysisFramework/ILCompiler.DependencyAnalysisFramework.csproj b/src/tools/crossgen2/ILCompiler.DependencyAnalysisFramework/ILCompiler.DependencyAnalysisFramework.csproj
index 8adc70d3d4af..696e59308f35 100644
--- a/src/tools/crossgen2/ILCompiler.DependencyAnalysisFramework/ILCompiler.DependencyAnalysisFramework.csproj
+++ b/src/tools/crossgen2/ILCompiler.DependencyAnalysisFramework/ILCompiler.DependencyAnalysisFramework.csproj
@@ -6,12 +6,12 @@
netstandard1.3
false
x64;x86
+ $(BuildArch)
false
- $(BinDir)/crossgen2
false
diff --git a/src/tools/crossgen2/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj b/src/tools/crossgen2/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
index 032f939696cb..7f46c381476f 100644
--- a/src/tools/crossgen2/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
+++ b/src/tools/crossgen2/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
@@ -7,12 +7,12 @@
READYTORUN;$(DefineConstants)
false
x64;x86
+ $(BuildArch)
false
- $(BinDir)/crossgen2
false
diff --git a/src/tools/crossgen2/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj b/src/tools/crossgen2/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj
index fdcd0bfa2ec6..2948bc0a2972 100644
--- a/src/tools/crossgen2/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj
+++ b/src/tools/crossgen2/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj
@@ -7,12 +7,12 @@
netstandard1.3
false
x64;x86
+ $(BuildArch)
false
- $(BinDir)/crossgen2
false
diff --git a/src/tools/crossgen2/crossgen2/crossgen2.csproj b/src/tools/crossgen2/crossgen2/crossgen2.csproj
index f2ad4d259047..a33cd3b48e7e 100644
--- a/src/tools/crossgen2/crossgen2/crossgen2.csproj
+++ b/src/tools/crossgen2/crossgen2/crossgen2.csproj
@@ -6,12 +6,13 @@
netcoreapp3.0
8002,NU1701
x64;x86
+ $(BuildArch)
false
- $(BinDir)/crossgen2
+ $(BinDir)/crossgen2
false
false