summaryrefslogtreecommitdiff
path: root/src/zap
diff options
context:
space:
mode:
Diffstat (limited to 'src/zap')
-rw-r--r--src/zap/zapper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zap/zapper.cpp b/src/zap/zapper.cpp
index 6b45bc27f6..38206b61d0 100644
--- a/src/zap/zapper.cpp
+++ b/src/zap/zapper.cpp
@@ -1377,6 +1377,13 @@ void Zapper::InitializeCompilerFlags(CORCOMPILE_VERSION_INFO * pVersionInfo)
if (pVersionInfo->wCodegenFlags & CORCOMPILE_CODEGEN_PROF_INSTRUMENTING)
m_pOpt->m_compilerFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_BBINSTR);
+ // Set CORJIT_FLAG_MIN_OPT only if COMPlus_JitMinOpts == 1
+ static ConfigDWORD g_jitMinOpts;
+ if (g_jitMinOpts.val_DontUse_(CLRConfig::UNSUPPORTED_JITMinOpts, 0) == 1)
+ {
+ m_pOpt->m_compilerFlags.Set(CORJIT_FLAGS::CORJIT_FLAG_MIN_OPT);
+ }
+
#if defined(_TARGET_X86_)
// @TODO: This is a copy of SetCpuInfo() in vm\codeman.cpp. Unify the implementaion