diff options
Diffstat (limited to 'src/jit/ee_il_dll.cpp')
-rw-r--r-- | src/jit/ee_il_dll.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jit/ee_il_dll.cpp b/src/jit/ee_il_dll.cpp index da0ae901fe..3c33d418a6 100644 --- a/src/jit/ee_il_dll.cpp +++ b/src/jit/ee_il_dll.cpp @@ -52,6 +52,14 @@ void __stdcall jitStartup(ICorJitHost* jitHost) { g_jitHost = jitHost; + // `jitStartup` may be called multiple times + // when pre-jitting. We should not reinitialize + // config values each time. + if (!JitConfig.isInitialized()) + { + JitConfig.initialize(jitHost); + } + #ifdef FEATURE_TRACELOGGING JitTelemetry::NotifyDllProcessAttach(); #endif @@ -285,8 +293,7 @@ unsigned CILJit::getMaxIntrinsicSIMDVectorLength(DWORD cpuCompileFlags) ((cpuCompileFlags & CORJIT_FLG_FEATURE_SIMD) != 0) && ((cpuCompileFlags & CORJIT_FLG_USE_AVX2) != 0)) { - static ConfigDWORD fEnableAVX; - if (fEnableAVX.val(CLRConfig::EXTERNAL_EnableAVX) != 0) + if (JitConfig.EnableAVX() != 0) { return 32; } |