diff --git a/eng/illink.targets b/eng/illink.targets
index 79eb5d409643b7..4f4dd3d62d95d4 100644
--- a/eng/illink.targets
+++ b/eng/illink.targets
@@ -216,6 +216,25 @@
$(ILLinkArgs) --disable-opt unusedinterfaces
$(ILLinkArgs) --keep-dep-attributes true
+
+ $(ILLinkArgs) --verbose
+
+ $(ILLinkArgs) --nowarn IL1001;IL2006;IL2008;IL2009;IL2012;IL2025;IL2026;IL2035;IL2041;IL2047;IL2050
diff --git a/src/coreclr/crossgen-corelib.proj b/src/coreclr/crossgen-corelib.proj
index bf26cd259a8c5c..24944f668fdc1c 100644
--- a/src/coreclr/crossgen-corelib.proj
+++ b/src/coreclr/crossgen-corelib.proj
@@ -12,12 +12,12 @@
- <_CoreClrBuildScript Condition="$([MSBuild]::IsOsPlatform(Windows))">crossgen-corelib.cmd
- <_CoreClrBuildScript Condition="!$([MSBuild]::IsOsPlatform(Windows))">crossgen-corelib.sh
+ <_CoreClrBuildScript Condition="$([MSBuild]::IsOsPlatform(Windows)) and '$(TargetOs)' == 'Windows_NT'">crossgen-corelib.cmd
+ <_CoreClrBuildScript Condition="!$([MSBuild]::IsOsPlatform(Windows)) and '$(TargetOs)' != 'Windows_NT'">crossgen-corelib.sh
-
+
diff --git a/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj b/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
index c21e7eaa736b74..8fd01f99c7d529 100644
--- a/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
+++ b/src/coreclr/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
@@ -1,6 +1,11 @@
-
-
+
+
+ true
+ true
+
+
+
true
@@ -11,5 +16,8 @@
-
+
+
+
+
diff --git a/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj b/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
index ce1739f8d6f582..b35a516ffb9cf0 100644
--- a/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
+++ b/src/coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
@@ -1,6 +1,11 @@
-
-
+
+
+ true
+ true
+
+
+
true
@@ -11,5 +16,8 @@
-
+
+
+
+
diff --git a/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj b/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
index 5188a4cae99453..bf732414f3c314 100644
--- a/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
+++ b/src/coreclr/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
@@ -1,6 +1,11 @@
-
-
+
+
+ true
+ true
+
+
+
true
@@ -11,5 +16,8 @@
-
+
+
+
+
diff --git a/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs b/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs
index 5aeae5245e3e53..f698d96bb87fef 100644
--- a/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs
+++ b/src/coreclr/src/tools/aot/crossgen2/CommandLineOptions.cs
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if SHOULD_RUN_CROSSGEN
using System;
using System.CommandLine;
using System.IO;
@@ -206,3 +207,4 @@ public static Command RootCommand()
}
}
}
+#endif
diff --git a/src/coreclr/src/tools/aot/crossgen2/Program.cs b/src/coreclr/src/tools/aot/crossgen2/Program.cs
index be483cbda4819c..a87069ae2bb2d1 100644
--- a/src/coreclr/src/tools/aot/crossgen2/Program.cs
+++ b/src/coreclr/src/tools/aot/crossgen2/Program.cs
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if SHOULD_RUN_CROSSGEN
using System;
using System.Collections.Generic;
using System.CommandLine;
@@ -664,3 +665,14 @@ private static int InnerMain(CommandLineOptions buildOptions)
}
}
}
+#else
+namespace ILCompiler
+{
+ internal class Program
+ {
+ public static void Main(string[] args)
+ {
+ }
+ }
+}
+#endif
diff --git a/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj
index 2de5f56821453f..05ed62d27cce02 100644
--- a/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj
+++ b/src/coreclr/src/tools/aot/crossgen2/crossgen2.csproj
@@ -16,30 +16,6 @@
Debug;Release;Checked
-
-
- true
- System.SR
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(SystemCommandLineVersion)
-
-
-
x64
@@ -55,23 +31,57 @@
.dylib
$(LibraryNamePrefix)jitinterface$(LibraryNameExtension)
-
-
-
-
-
-
+ true
+ true
+ $(DefineConstants);SHOULD_RUN_CROSSGEN
+
-
+
+
+
+
+
+ true
+ System.SR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SystemCommandLineVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
$(BinDir)\$(CrossHostArch)\crossgen2
@@ -98,9 +108,9 @@
-
+
-
+
.a
.lib
diff --git a/src/libraries/Native/build-native.proj b/src/libraries/Native/build-native.proj
index 28dc8184f01cf0..891e754266dba5 100644
--- a/src/libraries/Native/build-native.proj
+++ b/src/libraries/Native/build-native.proj
@@ -13,7 +13,7 @@
+ Condition="'$(TargetOS)' != 'Windows_NT' and '$(OS)' != 'Windows_NT'">
libmonosgen-2.0.dylib
libmonosgen-2.0.so
libmonosgen-2.0.a
@@ -943,6 +944,10 @@
<_MonoRuntimeFilePath Condition="'$(TargetstvOS)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib
<_MonoRuntimeFilePath Condition="'$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.so
<_MonoRuntimeFilePath Condition="'$(TargetsBrowser)' == 'true'">$(MonoObjDir)mono\mini\.libs\libmonosgen-2.0.a
+ <_MonoRuntimeFilePath Condition="'$(TargetsBrowser)' == 'true'">$(MonoObjDir)mono\mini\.libs\libmonosgen-2.0.a
+ <_MonoRuntimeFilePath Condition="'$(TargetsLinux)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Platform)' == 'x64'">$(MonoObjDir)x64\Bin\$(Configuration)\mono-2.0-sgen.dll
+ <_MonoRuntimeFilePath Condition="'$(TargetsOSX)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Platform)' == 'x64'">$(MonoObjDir)x64\Bin\$(Configuration)\mono-2.0-sgen.dll
+ <_MonoRuntimeFilePath Condition="'$(TargetsLinux)' == 'true' and '$(OS)' == 'OSX'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib
<_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == ''">$(MonoObjDir)mono\mini\.libs\libmonosgen-2.0.so
<_MonoRuntimeStaticFilePath Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a
<_MonoAotCrossFilePath Condition="'$(TargetsiOS)' == 'true' and '$(Platform)' == 'arm64'">$(MonoObjDir)cross\out\bin\aarch64-apple-darwin10-mono-sgen
@@ -1001,7 +1006,11 @@
SkipUnchangedFiles="true"
Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true' or '$(TargetsBrowser)' == 'true'"/>
-
+
+ true
+
+
+