From 465f56ef0c9c4b125d890e7ac0757e77d54e193c Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Mon, 5 Oct 2015 14:16:32 -0700 Subject: [PATCH] Producing standalone Jit for testing protojit.dll (Windows) / libprotojit.so (*nix) is produced in addition, which is a standalone Jit that are not attached to CoreCLR. Note CoreCLR still embeds such Jit by default same as before to not disrupt the existing clients. This (same) standalone Jit can be used for other testing purpose and also this can be specified as an altjit as well in CoreCLR. Added to nuget dev package. --- ...crosoft.DotNet.CoreCLR.Debug.Development.nuspec | 2 + .../Microsoft.DotNet.CoreCLR.Development.nuspec | 2 + src/jit/CMakeLists.txt | 1 + src/jit/ee_il_dll.cpp | 1 + src/jit/standalone/CMakeLists.txt | 48 ++++++++++++++++++++++ 5 files changed, 54 insertions(+) create mode 100644 src/jit/standalone/CMakeLists.txt diff --git a/src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec b/src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec index 4fbbdf5..2080c18 100644 --- a/src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec +++ b/src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec @@ -24,6 +24,7 @@ + @@ -34,6 +35,7 @@ + diff --git a/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec b/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec index fe3a59f..3a4d2b0 100644 --- a/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec +++ b/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec @@ -24,6 +24,7 @@ + @@ -34,6 +35,7 @@ + diff --git a/src/jit/CMakeLists.txt b/src/jit/CMakeLists.txt index e9f84e0..35add2e 100644 --- a/src/jit/CMakeLists.txt +++ b/src/jit/CMakeLists.txt @@ -133,3 +133,4 @@ set(CLR_EXPORTED_SYMBOL_FILE ${CLRJIT_EXPORTS_DEF}) add_subdirectory(dll) add_subdirectory(crossgen) +add_subdirectory(standalone) diff --git a/src/jit/ee_il_dll.cpp b/src/jit/ee_il_dll.cpp index 48453e2..90e50ed 100644 --- a/src/jit/ee_il_dll.cpp +++ b/src/jit/ee_il_dll.cpp @@ -94,6 +94,7 @@ HINSTANCE GetModuleInst() return (g_hInst); } +extern "C" void __stdcall sxsJitStartup(CoreClrCallbacks const & cccallbacks) { #ifndef SELF_NO_HOST diff --git a/src/jit/standalone/CMakeLists.txt b/src/jit/standalone/CMakeLists.txt new file mode 100644 index 0000000..378b75f --- /dev/null +++ b/src/jit/standalone/CMakeLists.txt @@ -0,0 +1,48 @@ +project(protojit) +add_definitions(-DFEATURE_NO_HOST) +add_definitions(-DSELF_NO_HOST) +add_definitions(-DFEATURE_READYTORUN_COMPILER) +remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) + +add_library(protojit + SHARED + ${SHARED_LIB_SOURCES} +) + +set(PROTOJIT_LINK_LIBRARIES + utilcodestaticnohost + gcinfo +) + +if(CLR_CMAKE_PLATFORM_UNIX) + list(APPEND PROTOJIT_LINK_LIBRARIES + mscorrc_debug + coreclrpal + palrt + ) +else() + list(APPEND PROTOJIT_LINK_LIBRARIES + msvcrt.lib + kernel32.lib + advapi32.lib + ole32.lib + oleaut32.lib + uuid.lib + user32.lib + version.lib + shlwapi.lib + bcrypt.lib + crypt32.lib + RuntimeObject.lib + ) +endif(CLR_CMAKE_PLATFORM_UNIX) + +target_link_libraries(protojit + ${PROTOJIT_LINK_LIBRARIES} +) + +# add the install targets +install (TARGETS protojit DESTINATION .) +if(WIN32) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$/protojit.pdb DESTINATION PDB) +endif(WIN32) -- 2.7.4