Fix PGO on Windows (#24949)
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Tue, 4 Jun 2019 18:49:51 +0000 (11:49 -0700)
committerBrian Robbins <brianrob@microsoft.com>
Tue, 4 Jun 2019 18:49:51 +0000 (11:49 -0700)
* Add warning disables around InitJITHelpers1 for C4731

* Move configureoptimization up in configurecompiler.

configurecompiler.cmake
src/vm/i386/jitinterfacex86.cpp

index 0ad08eb..a8a8ffc 100644 (file)
@@ -7,6 +7,8 @@ set(CLR_DEFINES_CHECKED_INIT            DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Che
 set(CLR_DEFINES_RELEASE_INIT            NDEBUG URTBLDENV_FRIENDLY=Retail)
 set(CLR_DEFINES_RELWITHDEBINFO_INIT     NDEBUG URTBLDENV_FRIENDLY=Retail)
 
+include(${CMAKE_CURRENT_LIST_DIR}/configureoptimization.cmake)
+
 #----------------------------------------
 # Detect and set platform variable names
 #     - for non-windows build platform & architecture is detected using inbuilt CMAKE variables and cross target component configure
@@ -631,5 +633,3 @@ if(CLR_CMAKE_ENABLE_CODE_COVERAGE)
   endif(CLR_CMAKE_PLATFORM_UNIX)
 
 endif(CLR_CMAKE_ENABLE_CODE_COVERAGE)
-
-include(${CMAKE_CURRENT_LIST_DIR}/configureoptimization.cmake)
index 2444a7b..36296f3 100644 (file)
@@ -1168,6 +1168,7 @@ static const void * const c_rgDebugWriteBarriers[NUM_WRITE_BARRIERS] = {
 // Initialize the part of the JIT helpers that require very little of
 // EE infrastructure to be in place.
 /*********************************************************************/
+#pragma warning (disable : 4731)
 void InitJITHelpers1()
 {
     STANDARD_VM_CONTRACT;
@@ -1332,6 +1333,7 @@ void InitJITHelpers1()
     // Initialize g_TailCallFrameVptr for JIT_TailCall helper
     g_TailCallFrameVptr = (void*)TailCallFrame::GetMethodFrameVPtr();
 }
+#pragma warning (default : 4731)
 
 // these constans are offsets into our write barrier helpers for values that get updated as the bounds of the managed heap change.
 // ephemeral region