summaryrefslogtreecommitdiff
path: root/src/jit/protojit
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/protojit')
-rw-r--r--src/jit/protojit/.gitmirror1
-rw-r--r--src/jit/protojit/CMakeLists.txt51
-rw-r--r--src/jit/protojit/SOURCES10
-rw-r--r--src/jit/protojit/makefile7
-rw-r--r--src/jit/protojit/protojit.def7
-rw-r--r--src/jit/protojit/protojit.nativeproj88
6 files changed, 164 insertions, 0 deletions
diff --git a/src/jit/protojit/.gitmirror b/src/jit/protojit/.gitmirror
new file mode 100644
index 0000000000..f507630f94
--- /dev/null
+++ b/src/jit/protojit/.gitmirror
@@ -0,0 +1 @@
+Only contents of this folder, excluding subfolders, will be mirrored by the Git-TFS Mirror. \ No newline at end of file
diff --git a/src/jit/protojit/CMakeLists.txt b/src/jit/protojit/CMakeLists.txt
new file mode 100644
index 0000000000..e3cc769ba0
--- /dev/null
+++ b/src/jit/protojit/CMakeLists.txt
@@ -0,0 +1,51 @@
+project(protojit)
+
+add_definitions(-DALT_JIT)
+add_definitions(-DFEATURE_NO_HOST)
+add_definitions(-DSELF_NO_HOST)
+remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
+
+add_library_clr(protojit
+ SHARED
+ ${SHARED_LIB_SOURCES}
+)
+
+add_dependencies(protojit jit_exports)
+
+set_property(TARGET protojit APPEND_STRING PROPERTY LINK_FLAGS ${JIT_EXPORTS_LINKER_OPTION})
+set_property(TARGET protojit 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
+ 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
+ ${RYUJIT_LINK_LIBRARIES}
+)
+
+# add the install targets
+install_clr(protojit)
diff --git a/src/jit/protojit/SOURCES b/src/jit/protojit/SOURCES
new file mode 100644
index 0000000000..5f46bf8aad
--- /dev/null
+++ b/src/jit/protojit/SOURCES
@@ -0,0 +1,10 @@
+
+#
+# DO NOT EDIT THIS FILE!!! Modify the project file in this directory
+# This file merely allows the MSBuild project file in this directory to be integrated with Build.Exe
+#
+TARGETTYPE=NOTARGET
+CLR_TARGETTYPE=DLL
+MSBuildProjectFile=protojit.nativeproj
+SOURCES=
+
diff --git a/src/jit/protojit/makefile b/src/jit/protojit/makefile
new file mode 100644
index 0000000000..84abb1cb0d
--- /dev/null
+++ b/src/jit/protojit/makefile
@@ -0,0 +1,7 @@
+
+#
+# DO NOT EDIT THIS FILE!!! Modify the project file in this directory
+# This file merely allows the MSBuild project file in this directory to be integrated with Build.Exe
+#
+!INCLUDE $(NTMAKEENV)\msbuild.def
+ \ No newline at end of file
diff --git a/src/jit/protojit/protojit.def b/src/jit/protojit/protojit.def
new file mode 100644
index 0000000000..1603af74ca
--- /dev/null
+++ b/src/jit/protojit/protojit.def
@@ -0,0 +1,7 @@
+; Licensed to the .NET Foundation under one or more agreements.
+; The .NET Foundation licenses this file to you under the MIT license.
+; See the LICENSE file in the project root for more information.
+EXPORTS
+ getJit
+ jitStartup
+ sxsJitStartup
diff --git a/src/jit/protojit/protojit.nativeproj b/src/jit/protojit/protojit.nativeproj
new file mode 100644
index 0000000000..3de0f0aeed
--- /dev/null
+++ b/src/jit/protojit/protojit.nativeproj
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="dogfood">
+
+ <!--
+ PROTO JIT: The purpose of this module is to provide an isolated environment to develop
+ the RyuJIT backend without interfering with the development of the frontend. The
+ idea is to fork codegen and registerfp, that way we leave the PUCLR backend intact so
+ it can be still consumed by the RyuJIT frontend separately maintaining the code stability
+ of the PUCLR codegen.cpp logic.
+
+ This module is meant to be a 'development' JIT, i.e. try to use the generated code by this JIT
+ and in case something goes wrong, fallback to the default JIT.
+ -->
+
+ <!-- Import the CLR's settings -->
+
+ <Import Project="$(_NTDRIVE)$(_NTROOT)\ndp\clr\clr.props" />
+
+ <PropertyGroup>
+
+ <!-- Set the output -->
+
+ <OutputName>protojit</OutputName>
+ <StaticLinkJit>$(FeatureMergeJitAndEngine)</StaticLinkJit>
+ <FeatureMergeJitAndEngine>false</FeatureMergeJitAndEngine>
+ <TargetType>DYNLINK</TargetType>
+ <FileToMarkForSigning>$(BinariesDirectory)\protojit.dll</FileToMarkForSigning>
+ <BuildCoreBinaries>false</BuildCoreBinaries>
+ <BuildSysBinaries>false</BuildSysBinaries>
+
+ <!-- Motherhood & apple pie here -->
+
+ <DllEntryPoint>_DllMainCRTStartup</DllEntryPoint>
+ <LinkSubsystem>windows</LinkSubsystem>
+ <LibCLib Condition="'$(StaticLinkJit)'!='true'">$(ClrCrtLib)</LibCLib>
+
+ <!-- JIT specific baloney -->
+
+ <LinkModuleDefinitionFile>$(OutputName).def</LinkModuleDefinitionFile>
+
+ <ClDefines>$(ClDefines);ALT_JIT</ClDefines>
+ <ClDefines Condition="'$(BuildArchitecture)' == 'amd64'">$(ClDefines);FEATURE_SIMD;FEATURE_AVX_SUPPORT</ClDefines>
+
+ <Win32DllLibs>$(SdkLibPath)\kernel32.lib;$(SdkLibPath)\user32.lib;$(SdkLibPath)\advapi32.lib;$(SdkLibPath)\oleaut32.lib;$(SdkLibPath)\uuid.lib</Win32DllLibs>
+ <Win32DllLibs>$(Win32DllLibs);$(ClrLibPath)\utilcode.lib</Win32DllLibs>
+
+ <!-- Profile-guided optimization -->
+
+ <PogoOptimize>false</PogoOptimize>
+ <PogoInstrument>false</PogoInstrument>
+ <PogoUpdate>false</PogoUpdate>
+
+ <!-- Do we want to build with msvcdis disassembly capability? This should be enabled for DEBUG, disabled otherwise.
+ However, it can be useful for debugging purposes, such as generating assembly diffs between CHK and RET JITs,
+ to enable it temporarily in non-DEBUG builds, by forcing the EnableLateDisasm property to 'true'.
+ -->
+ <EnableLateDisasm Condition="'$(DebugBuild)' == 'true' and '$(BuildArchitecture)' != 'arm' and '$(BuildForCoreSystem)' != 'true'">true</EnableLateDisasm>
+ <!--
+ <EnableLateDisasm Condition="'$(BuildArchitecture)' != 'arm' and '$(BuildForCoreSystem)' != 'true'">true</EnableLateDisasm>
+ -->
+ <ClDefines Condition="'$(EnableLateDisasm)' == 'true'">$(ClDefines);LATE_DISASM=1</ClDefines>
+ <LinkDelayLoad Condition="'$(EnableLateDisasm)' == 'true'">$(LinkDelayLoad);msvcdis$(VC_NONCRT_ProdVerX).dll</LinkDelayLoad>
+ <UseDelayimpLib Condition="'$(EnableLateDisasm)' == 'true' and '$(FeatureMergeJitAndEngine)'!='true'">true</UseDelayimpLib>
+
+ </PropertyGroup>
+
+ <!-- Leaf Project Items -->
+
+ <ItemGroup>
+ <ProjectReference Include="$(ClrSrcDirectory)utilcode\dyncrt\dyncrt.nativeproj" />
+ <TargetLib Include="$(SdkLibPath)\mscoree.lib" />
+ <TargetLib Condition="'$(BuildArchitecture)'!='i386'" Include="$(ClrLibPath)\gcinfo.lib">
+ <ProjectReference>$(ClrSrcDirectory)gcinfo\lib\gcinfo.nativeproj</ProjectReference>
+ </TargetLib>
+ <TargetLib Condition="'$(UseDelayimpLib)' == 'true'" Include="$(ClrLibPath)\delayimp.lib">
+ <ProjectReference>$(ClrSrcDirectory)delayimp\delayimp.nativeproj</ProjectReference>
+ </TargetLib>
+ <TargetLib Condition="'$(DebugBuild)' == 'true'" Include="$(ClrLibPath)\gcdump.lib">
+ <ProjectReference>$(ClrSrcDirectory)gcdump\lib\gcdump.nativeproj</ProjectReference>
+ </TargetLib>
+ <TargetLib Condition="'$(DebugBuild)' == 'true'" Include="$(SdkLibPath)\ole32.lib" />
+ <TargetLib Condition="'$(EnableLateDisasm)' == 'true'" Include="$(VCToolsLibPath)\msvcdis.lib" />
+ <RCResourceFile Include="..\native.rc" />
+ </ItemGroup>
+
+ <Import Project="..\jit.settings.targets" />
+
+</Project>