Use Knobs to populate AppContext switches (#86883)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Wed, 31 May 2023 09:34:54 +0000 (18:34 +0900)
committerGitHub <noreply@github.com>
Wed, 31 May 2023 09:34:54 +0000 (18:34 +0900)
commitf9246538e3d49b90b0e9128d7b1defef57cd6911
treed5c20e8ac2eefe313b297bffb78b9bc94e4ae8c5
parent1f96376fabb0fc31dde556495da87d95adb37acc
Use Knobs to populate AppContext switches (#86883)

Previously AppContext switches were set by injecting a method that calls `AppContext.SetSwitch` at startup. Use the configuration blob added in #86068 instead. This makes startup a tiny bit faster and the outputs a tiny bit smaller.

Fixes #77054.
14 files changed:
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
src/coreclr/nativeaot/Runtime/MiscHelpers.cpp
src/coreclr/nativeaot/Runtime/RhConfig.cpp
src/coreclr/nativeaot/Runtime/RhConfig.h
src/coreclr/nativeaot/System.Private.CoreLib/src/System/AppContext.NativeAot.cs
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeConfigurationRootProvider.cs
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/RuntimeKnobsRootProvider.cs [deleted file]
src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.Sorting.cs [deleted file]
src/coreclr/tools/aot/ILCompiler.Compiler/IL/Stubs/StartupCode/AppContextInitializerMethod.cs [deleted file]
src/coreclr/tools/aot/ILCompiler.Compiler/ILCompiler.Compiler.csproj
src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
src/coreclr/tools/aot/ILCompiler/Program.cs
src/libraries/System.Private.CoreLib/src/System/AppContext.cs