Use a JIT-specific stdout `FILE*`.
authorPat Gavlin <pagavlin@microsoft.com>
Thu, 12 May 2016 21:32:13 +0000 (14:32 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Thu, 12 May 2016 23:20:20 +0000 (16:20 -0700)
commit57fd11a08da9a8b2f530bd9046c3c5bc0d175f41
tree8b08a898155e1f01fc0fc4b02a84575a37f7efe0
parent7e68ba90b17453c8157d7406ba708f1ae60217cf
Use a JIT-specific stdout `FILE*`.

Historically, the JIT has had issues with logging inside of processes
that change the output mode of stdout (e.g. crossgen). This change
replaces the previous solution (which relied on #ifdefs) by dup'ing
the stdout file and wrapping it in a new `FILE*` set to a known
output mode.

Commit migrated from https://github.com/dotnet/coreclr/commit/8172ccaa93df60a46712f3453a4871ce0026f3ea
src/coreclr/src/jit/codegencommon.cpp
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/disasm.cpp
src/coreclr/src/jit/ee_il_dll.cpp
src/coreclr/src/jit/error.cpp
src/coreclr/src/jit/flowgraph.cpp
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/host.h
src/coreclr/src/jit/inline.cpp