Skip to content

Commit 6ce9795

Browse files
Basic support of InProcessNoEmitRunner for NativeAOT. (#2702)
* Basic support of `InProcessNoEmitRunner` for NativeAOT. * Wrap DynamicDependency with support macro condition. Co-authored-by: Tim Cassell <[email protected]> * Fix missing usings. --------- Co-authored-by: Tim Cassell <[email protected]>
1 parent 021fc69 commit 6ce9795

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/BenchmarkDotNet/Toolchains/InProcess/NoEmit/InProcessNoEmitRunner.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
using System;
2+
using System.Diagnostics.CodeAnalysis;
23
using System.Reflection;
34
using BenchmarkDotNet.Engines;
45
using BenchmarkDotNet.Environments;
@@ -15,6 +16,9 @@ namespace BenchmarkDotNet.Toolchains.InProcess.NoEmit
1516
/// </summary>
1617
internal class InProcessNoEmitRunner
1718
{
19+
#if NET6_0_OR_GREATER
20+
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Runnable))]
21+
#endif
1822
public static int Run(IHost host, BenchmarkCase benchmarkCase)
1923
{
2024
// the first thing to do is to let diagnosers hook in before anything happens
@@ -157,4 +161,4 @@ public static void RunCore(IHost host, BenchmarkCase benchmarkCase)
157161
}
158162
}
159163
}
160-
}
164+
}

0 commit comments

Comments
 (0)