assert(!JitConfig.isInitialized());
JitConfig.initialize(jitHost);
-#if defined(_HOST_UNIX_)
- jitstdout = procstdout();
-#else // !_HOST_UNIX_
+#ifdef DEBUG
+ const wchar_t* jitStdOutFile = JitConfig.JitStdOutFile();
+ if (jitStdOutFile != nullptr)
+ {
+ jitstdout = _wfopen(jitStdOutFile, W("a"));
+ assert(jitstdout != nullptr);
+ }
+#endif // DEBUG
+
+#if !defined(_HOST_UNIX_)
if (jitstdout == nullptr)
{
int stdoutFd = _fileno(procstdout());
}
}
}
+#endif // !_HOST_UNIX_
// If jitstdout is still null, fallback to whatever procstdout() was
// initially set to.
{
jitstdout = procstdout();
}
-#endif // !_HOST_UNIX_
#ifdef FEATURE_TRACELOGGING
JitTelemetry::NotifyDllProcessAttach();
CONFIG_INTEGER(JitSsaStress, W("JitSsaStress"), 0) // Perturb order of processing of blocks in SSA; 0 = no stress; 1 =
// use method hash; * = supplied value as random hash
CONFIG_INTEGER(JitStackChecks, W("JitStackChecks"), 0)
+CONFIG_STRING(JitStdOutFile, W("JitStdOutFile")) // If set, sends JIT's stdout output to this file.
CONFIG_INTEGER(JitStress, W("JitStress"), 0) // Internal Jit stress mode: 0 = no stress, 2 = all stress, other = vary
// stress based on a hash of the method and this value
CONFIG_INTEGER(JitStressBBProf, W("JitStressBBProf"), 0) // Internal Jit stress mode