diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs index 9f44f802f3d22b..de64f9eb277ce2 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs @@ -30,7 +30,7 @@ void ICompilationRootProvider.AddCompilationRoots(IRootingServiceProvider rootPr rootProvider.AddCompilationRoot(new RuntimeConfigurationBlobNode(_blobName, _runtimeOptions), "Runtime configuration"); } - private sealed class RuntimeConfigurationBlobNode : DehydratableObjectNode, ISymbolDefinitionNode + private sealed class RuntimeConfigurationBlobNode : ObjectNode, ISymbolDefinitionNode { private readonly string _blobName; private readonly IReadOnlyCollection _runtimeOptions; @@ -54,11 +54,12 @@ public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb) sb.Append(_blobName); } - protected override ObjectNodeSection GetDehydratedSection(NodeFactory factory) => ObjectNodeSection.ReadOnlyDataSection; + public override ObjectNodeSection GetSection(NodeFactory factory) => + factory.Target.IsWindows ? ObjectNodeSection.ReadOnlyDataSection : ObjectNodeSection.DataSection; protected override string GetName(NodeFactory factory) => this.GetMangledName(factory.NameMangler); - protected override ObjectData GetDehydratableData(NodeFactory factory, bool relocsOnly = false) + public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false) { var builder = new ObjectDataBuilder(factory.TypeSystemContext.Target, relocsOnly); builder.AddSymbol(this); diff --git a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj index 26c34d3c5d4283..131ddbd3b22576 100644 --- a/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj +++ b/src/coreclr/tools/aot/ILCompiler/repro/repro.csproj @@ -23,6 +23,7 @@ + diff --git a/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs b/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs index 3bf0f6de7ced62..55028fdee9adb9 100644 --- a/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs +++ b/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs @@ -25,6 +25,10 @@ public BringUpTest() public static int Main() { + // This test also doubles as server GC test + if (!System.Runtime.GCSettings.IsServerGC) + return 42; + if (string.Empty.Length > 0) { // Just something to make sure we generate reflection metadata for the type diff --git a/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.csproj b/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.csproj index 0b1a23bf56a1c8..fe80571c3550f2 100644 --- a/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.csproj +++ b/src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.csproj @@ -4,6 +4,7 @@ BuildAndRun 0 true + true