From 8a934c90711e0d1a915e309941a34db832395076 Mon Sep 17 00:00:00 2001 From: Petr Bred Date: Fri, 26 May 2017 17:17:05 +0300 Subject: [PATCH] Fix compile with disabled FEATURE_READYTORUN option (#11875) - just remove FEATURE_READYTORUN definitions in clrdefinitions.cmake to turn off option Signed-off-by: Petr Bred --- src/inc/corcompile.h | 2 ++ src/jit/legacynonjit/CMakeLists.txt | 5 ++++- src/jit/linuxnonjit/CMakeLists.txt | 5 ++++- src/jit/protojit/CMakeLists.txt | 5 ++++- src/jit/protononjit/CMakeLists.txt | 5 ++++- src/jit/standalone/CMakeLists.txt | 5 ++++- src/vm/ceeload.cpp | 2 ++ src/vm/compile.cpp | 2 ++ src/vm/compile.h | 2 ++ src/vm/eventpipe.cpp | 2 +- src/vm/eventpipe.h | 2 +- src/vm/eventpipeconfiguration.cpp | 2 +- src/vm/eventpipeconfiguration.h | 2 +- 13 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h index 68eefc1..f1c2314 100644 --- a/src/inc/corcompile.h +++ b/src/inc/corcompile.h @@ -1295,11 +1295,13 @@ class ICorCompilePreloader CORINFO_METHOD_HANDLE method, CORINFO_METHOD_HANDLE duplicateMethod) = 0; +#ifdef FEATURE_READYTORUN_COMPILER // Returns a compressed encoding of the inline tracking map // for this compilation virtual void GetSerializedInlineTrackingMap( IN OUT SBuffer * pSerializedInlineTrackingMap ) = 0; +#endif // // Release frees the preloader diff --git a/src/jit/legacynonjit/CMakeLists.txt b/src/jit/legacynonjit/CMakeLists.txt index de66d81..00fd9e5 100644 --- a/src/jit/legacynonjit/CMakeLists.txt +++ b/src/jit/legacynonjit/CMakeLists.txt @@ -3,7 +3,6 @@ project(legacynonjit) add_definitions(-DALT_JIT) add_definitions(-DFEATURE_NO_HOST) add_definitions(-DSELF_NO_HOST) -add_definitions(-DFEATURE_READYTORUN_COMPILER) remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) remove_definitions(-DFEATURE_SIMD) @@ -15,6 +14,10 @@ remove_definitions(-D_TARGET_X86_=1) add_definitions(-D_TARGET_ARM_) set(JIT_ARCH_ALTJIT_SOURCES ${JIT_ARM_SOURCES}) +if(FEATURE_READYTORUN) + add_definitions(-DFEATURE_READYTORUN_COMPILER) +endif(FEATURE_READYTORUN) + if(WIN32) add_definitions(-DFX_VER_INTERNALNAME_STR=legacynonjit.dll) endif(WIN32) diff --git a/src/jit/linuxnonjit/CMakeLists.txt b/src/jit/linuxnonjit/CMakeLists.txt index 87ec1e4..34899f2 100644 --- a/src/jit/linuxnonjit/CMakeLists.txt +++ b/src/jit/linuxnonjit/CMakeLists.txt @@ -3,9 +3,12 @@ project(linuxnonjit) add_definitions(-DALT_JIT) add_definitions(-DFEATURE_NO_HOST) add_definitions(-DSELF_NO_HOST) -add_definitions(-DFEATURE_READYTORUN_COMPILER) remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) +if(FEATURE_READYTORUN) + add_definitions(-DFEATURE_READYTORUN_COMPILER) +endif(FEATURE_READYTORUN) + if (CLR_CMAKE_PLATFORM_ARCH_I386) remove_definitions(-DFEATURE_SIMD) remove_definitions(-DFEATURE_AVX_SUPPORT) diff --git a/src/jit/protojit/CMakeLists.txt b/src/jit/protojit/CMakeLists.txt index d27f302..79fd9ae 100644 --- a/src/jit/protojit/CMakeLists.txt +++ b/src/jit/protojit/CMakeLists.txt @@ -3,9 +3,12 @@ project(protojit) add_definitions(-DALT_JIT) add_definitions(-DFEATURE_NO_HOST) add_definitions(-DSELF_NO_HOST) -add_definitions(-DFEATURE_READYTORUN_COMPILER) remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) +if(FEATURE_READYTORUN) + add_definitions(-DFEATURE_READYTORUN_COMPILER) +endif(FEATURE_READYTORUN) + if(WIN32) add_definitions(-DFX_VER_INTERNALNAME_STR=protojit.dll) endif(WIN32) diff --git a/src/jit/protononjit/CMakeLists.txt b/src/jit/protononjit/CMakeLists.txt index 6adf4b1..f8d9938 100644 --- a/src/jit/protononjit/CMakeLists.txt +++ b/src/jit/protononjit/CMakeLists.txt @@ -3,12 +3,15 @@ project(protononjit) add_definitions(-DALT_JIT) add_definitions(-DFEATURE_NO_HOST) add_definitions(-DSELF_NO_HOST) -add_definitions(-DFEATURE_READYTORUN_COMPILER) remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) remove_definitions(-DFEATURE_SIMD) remove_definitions(-DFEATURE_AVX_SUPPORT) +if(FEATURE_READYTORUN) + add_definitions(-DFEATURE_READYTORUN_COMPILER) +endif(FEATURE_READYTORUN) + if (CLR_CMAKE_PLATFORM_ARCH_I386) remove_definitions(-D_TARGET_X86_=1) add_definitions(-D_TARGET_ARM_) diff --git a/src/jit/standalone/CMakeLists.txt b/src/jit/standalone/CMakeLists.txt index 988108e..769b842 100644 --- a/src/jit/standalone/CMakeLists.txt +++ b/src/jit/standalone/CMakeLists.txt @@ -2,9 +2,12 @@ project(ryujit) add_definitions(-DFEATURE_NO_HOST) add_definitions(-DSELF_NO_HOST) -add_definitions(-DFEATURE_READYTORUN_COMPILER) remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) +if(FEATURE_READYTORUN) + add_definitions(-DFEATURE_READYTORUN_COMPILER) +endif(FEATURE_READYTORUN) + if(CLR_CMAKE_TARGET_ARCH_ARM) add_definitions(-DLEGACY_BACKEND) endif() diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp index 367819e..ef56342 100644 --- a/src/vm/ceeload.cpp +++ b/src/vm/ceeload.cpp @@ -467,6 +467,7 @@ void Module::InitializeForProfiling() } else // ReadyToRun image { +#ifdef FEATURE_READYTORUN_COMPILER // We already setup the m_methodProfileList in the ReadyToRunInfo constructor if (m_methodProfileList != nullptr) { @@ -476,6 +477,7 @@ void Module::InitializeForProfiling() // Enable profiling if the ZapBBInstr value says to m_nativeImageProfiling = GetAssembly()->IsInstrumented(); } +#endif } #ifdef FEATURE_LAZY_COW_PAGES diff --git a/src/vm/compile.cpp b/src/vm/compile.cpp index c24c3f2..49b329e 100644 --- a/src/vm/compile.cpp +++ b/src/vm/compile.cpp @@ -6826,11 +6826,13 @@ ULONG CEEPreloader::Release() return 0; } +#ifdef FEATURE_READYTORUN_COMPILER void CEEPreloader::GetSerializedInlineTrackingMap(SBuffer* pBuffer) { InlineTrackingMap * pInlineTrackingMap = m_image->GetInlineTrackingMap(); PersistentInlineTrackingMapR2R::Save(m_image->GetHeap(), pBuffer, pInlineTrackingMap); } +#endif void CEEPreloader::Error(mdToken token, Exception * pException) { diff --git a/src/vm/compile.h b/src/vm/compile.h index 5d4aff7..8618b01 100644 --- a/src/vm/compile.h +++ b/src/vm/compile.h @@ -654,7 +654,9 @@ public: ULONG Release(); +#ifdef FEATURE_READYTORUN_COMPILER void GetSerializedInlineTrackingMap(SBuffer* pBuffer); +#endif void Error(mdToken token, Exception * pException); }; diff --git a/src/vm/eventpipe.cpp b/src/vm/eventpipe.cpp index 4eae6a8..9a94923 100644 --- a/src/vm/eventpipe.cpp +++ b/src/vm/eventpipe.cpp @@ -107,7 +107,7 @@ void EventPipe::Shutdown() void EventPipe::Enable( LPCWSTR strOutputPath, - uint circularBufferSizeInMB, + unsigned int circularBufferSizeInMB, EventPipeProviderConfiguration *pProviders, int numProviders) { diff --git a/src/vm/eventpipe.h b/src/vm/eventpipe.h index a69e1ba..fa7d734 100644 --- a/src/vm/eventpipe.h +++ b/src/vm/eventpipe.h @@ -170,7 +170,7 @@ class EventPipe // Enable tracing via the event pipe. static void Enable( LPCWSTR strOutputPath, - uint circularBufferSizeInMB, + unsigned int circularBufferSizeInMB, EventPipeProviderConfiguration *pProviders, int numProviders); diff --git a/src/vm/eventpipeconfiguration.cpp b/src/vm/eventpipeconfiguration.cpp index 42f9daf..0a266e4 100644 --- a/src/vm/eventpipeconfiguration.cpp +++ b/src/vm/eventpipeconfiguration.cpp @@ -207,7 +207,7 @@ void EventPipeConfiguration::SetCircularBufferSize(size_t circularBufferSize) } void EventPipeConfiguration::Enable( - uint circularBufferSizeInMB, + unsigned int circularBufferSizeInMB, EventPipeProviderConfiguration *pProviders, int numProviders) { diff --git a/src/vm/eventpipeconfiguration.h b/src/vm/eventpipeconfiguration.h index de8e79d..aac9bd6 100644 --- a/src/vm/eventpipeconfiguration.h +++ b/src/vm/eventpipeconfiguration.h @@ -52,7 +52,7 @@ public: // Enable the event pipe. void Enable( - uint circularBufferSizeInMB, + unsigned int circularBufferSizeInMB, EventPipeProviderConfiguration *pProviders, int numProviders); -- 2.7.4