Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> _runtimeOptions;
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/tools/aot/ILCompiler/repro/repro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ReproResponseLines Include="-r:$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)*.dll" />
<ReproResponseLines Include="-g" />
<ReproResponseLines Include="-O" Condition="'$(Optimize)' == 'true'" />
<ReproResponseLines Include="--dehydrate" />
<ReproResponseLines Include="--generateunmanagedentrypoints:System.Private.CoreLib" />
<ReproResponseLines Include="--initassembly:System.Private.CoreLib" />
<ReproResponseLines Include="--initassembly:System.Private.StackTraceMetadata" />
Expand Down
4 changes: 4 additions & 0 deletions src/tests/nativeaot/SmokeTests/Exceptions/Exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<CLRTestKind>BuildAndRun</CLRTestKind>
<CLRTestPriority>0</CLRTestPriority>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
<Compile Include="Exceptions.cs" />
Expand Down