diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2017-03-02 09:14:52 -0800 |
---|---|---|
committer | Bruce Forstall <brucefo@microsoft.com> | 2017-03-02 14:16:30 -0800 |
commit | db2c3f635d49cc3072ede8f39174459cd764fda4 (patch) | |
tree | c41898d9c5339661ad618c5e386772c932ff8211 /src/jit/protononjit | |
parent | 39b7281317201d4a5380fb6d57504ae9be598346 (diff) | |
download | coreclr-db2c3f635d49cc3072ede8f39174459cd764fda4.tar.gz coreclr-db2c3f635d49cc3072ede8f39174459cd764fda4.tar.bz2 coreclr-db2c3f635d49cc3072ede8f39174459cd764fda4.zip |
Build cross-compile altjits for arm32 and arm64
On x86, build an x86-host, arm32-target altjit.
On amd64, build an amd64-host, arm64-target altjit.
Each are named protononjit.dll, using our existing naming
convention (proto for "prototype", nonjit meaning the code
won't be executed).
Use these via:
```
set COMPlus_AltJit=*
set COMPlus_AltJitName=protononjit.dll
```
Of course, instead of `*`, you can use any function name.
They are very useful for debugging the JIT in a "nicer" environment
than the full native environment, especially if the full native
environment isn't complete, or if the tools (such as debuggers, editors)
are better in the cross environment than the native environment.
These are only built on Windows. It might be possible to build them
on Linux as well, but that will require some more build work.
Diffstat (limited to 'src/jit/protononjit')
-rw-r--r-- | src/jit/protononjit/CMakeLists.txt | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/jit/protononjit/CMakeLists.txt b/src/jit/protononjit/CMakeLists.txt new file mode 100644 index 0000000000..ed6932e9a2 --- /dev/null +++ b/src/jit/protononjit/CMakeLists.txt @@ -0,0 +1,73 @@ +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 (CLR_CMAKE_PLATFORM_ARCH_I386) + remove_definitions(-D_TARGET_X86_=1) + add_definitions(-D_TARGET_ARM_) + set(JIT_ARCH_ALTJIT_SOURCES ${JIT_ARM_SOURCES}) +elseif(CLR_CMAKE_PLATFORM_ARCH_AMD64) + remove_definitions(-D_TARGET_AMD64_=1) + add_definitions(-D_TARGET_ARM64_) + set(JIT_ARCH_ALTJIT_SOURCES ${JIT_ARM64_SOURCES}) +else() + clr_unknown_arch() +endif() + +if(WIN32) + add_definitions(-DFX_VER_INTERNALNAME_STR=protononjit.dll) +endif(WIN32) + +add_library_clr(protononjit + SHARED + ${SHARED_LIB_SOURCES} + ${JIT_ARCH_ALTJIT_SOURCES} +) + +add_dependencies(protononjit jit_exports) + +set_property(TARGET protononjit APPEND_STRING PROPERTY LINK_FLAGS ${JIT_EXPORTS_LINKER_OPTION}) +set_property(TARGET protononjit APPEND_STRING PROPERTY LINK_DEPENDS ${JIT_EXPORTS_FILE}) + +set(RYUJIT_LINK_LIBRARIES + utilcodestaticnohost + gcinfo +) + +if(CLR_CMAKE_PLATFORM_UNIX) + list(APPEND RYUJIT_LINK_LIBRARIES + mscorrc_debug + coreclrpal + palrt + ) +else() + list(APPEND RYUJIT_LINK_LIBRARIES + ${STATIC_MT_CRT_LIB} + ${STATIC_MT_VCRT_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(protononjit + ${RYUJIT_LINK_LIBRARIES} +) + +# add the install targets +install_clr(protononjit) |