Skip to content

Commit fc8c68f

Browse files
authored
Workaround for a bug in latest MSVC (#120282)
1 parent 73893d9 commit fc8c68f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/coreclr/debug/daccess/dacdbiimpl.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,11 @@ void DacDbiInterfaceImpl::GetSequencePoints(MethodDesc * pMethodDesc,
935935
// Function Data
936936
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
937937

938+
// Workaround for https://developercommunity.visualstudio.com/t/C-compiling-hangs-building-checked-bui/10974056 . Delete
939+
// once MSVC compiler with a fix is released.
940+
#ifdef _MSC_VER
941+
#pragma optimize("", off)
942+
#endif
938943

939944
// GetILCodeAndSig returns the function's ILCode and SigToken given
940945
// a module and a token. The info will come from a MethodDesc, if
@@ -996,6 +1001,10 @@ void DacDbiInterfaceImpl::GetILCodeAndSig(VMPTR_DomainAssembly vmDomainAssembly,
9961001

9971002
} // GetILCodeAndSig
9981003

1004+
#ifdef _MSC_VER
1005+
#pragma optimize("", on)
1006+
#endif
1007+
9991008
//---------------------------------------------------------------------------------------
10001009
//
10011010
// This is just a worker function for GetILCodeAndSig. It returns the function's ILCode and SigToken

0 commit comments

Comments
 (0)