summaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
authorJohn Chen <jochen@microsoft.com>2015-04-20 08:36:31 -0700
committerJohn Chen <jochen@microsoft.com>2015-04-20 08:36:31 -0700
commit10ad17e525b7c5f6432e3c1b0a453d291e5d78b6 (patch)
tree46315b7efcfd5b6da8382cc0bb5b659c6d3d5d5c /src/jit
parent6288f3d99995661184d90d542511ff37905ef299 (diff)
downloadcoreclr-10ad17e525b7c5f6432e3c1b0a453d291e5d78b6.tar.gz
coreclr-10ad17e525b7c5f6432e3c1b0a453d291e5d78b6.tar.bz2
coreclr-10ad17e525b7c5f6432e3c1b0a453d291e5d78b6.zip
Enable build crossgen.exe from build.cmd.
Adds and modifies CMakeLists.txt files to enable building of crossgen.exe from build.cmd for x64 processor on Windows. Also adds a step in build.cmd to generate native image for mscorlib. [tfs-changeset: 1456454]
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/CMakeLists.txt41
-rw-r--r--src/jit/crossgen/.gitmirror1
-rw-r--r--src/jit/crossgen/CMakeLists.txt3
-rw-r--r--src/jit/crossgen/jit_crossgen.nativeproj20
-rw-r--r--src/jit/dll/.gitmirror1
-rw-r--r--src/jit/dll/CMakeLists.txt33
-rw-r--r--src/jit/dll/altjit.def8
-rw-r--r--src/jit/dll/clrjit.def8
-rw-r--r--src/jit/dll/jit.nativeproj93
9 files changed, 174 insertions, 34 deletions
diff --git a/src/jit/CMakeLists.txt b/src/jit/CMakeLists.txt
index 3848fa7a61..d5f26233cc 100644
--- a/src/jit/CMakeLists.txt
+++ b/src/jit/CMakeLists.txt
@@ -1,5 +1,3 @@
-project(ClrJit)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories("./jitstd")
@@ -64,9 +62,11 @@ set( SOURCES
unwindamd64.cpp
)
+convert_to_absolute_path(SOURCES ${SOURCES})
+
if( WIN32 )
- add_precompiled_header(jitpch.h jitpch.cpp SOURCES)
+ add_precompiled_header(jitpch.h ../jitpch.cpp SOURCES)
# Create .def file containing a list of exports preceeded by
# 'EXPORTS'. The file "ClrJit.exports" already contains the list, so we
@@ -89,34 +89,7 @@ endif()
set(CLR_EXPORTED_SYMBOL_FILE ${CLRJIT_EXPORTS_DEF})
-# Disable the following for UNIX altjit on Windows
-if(CLR_CMAKE_PLATFORM_UNIX)
- add_compile_options(-Wno-trigraphs)
- add_compile_options(-fPIC)
- add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
-
- add_library(ClrJit
- STATIC
- ${SHARED_LIB_SOURCES}
- )
- add_dependencies(ClrJit coreclrpal gcinfo)
-else()
- add_library(ClrJit
- ${SOURCES}
- )
-# Disable up to here (see above) the following for UNIX altjit on Windows
-# Enable the following for UNIX altjit on Windows
-# add_library(ClrJit
-# SHARED
-# ${SHARED_LIB_SOURCES}
-# )
-
-# Enable the following for UNIX altjit on Windows
-#target_link_libraries(ClrJit
-# utilcode
-# gcinfo
-# runtime_library
-# )
-
-# Disable the following for UNIX altjit on Windows
-endif(CLR_CMAKE_PLATFORM_UNIX)
+add_subdirectory(dll)
+if(WIN32)
+ add_subdirectory(crossgen)
+endif()
diff --git a/src/jit/crossgen/.gitmirror b/src/jit/crossgen/.gitmirror
new file mode 100644
index 0000000000..f507630f94
--- /dev/null
+++ b/src/jit/crossgen/.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/crossgen/CMakeLists.txt b/src/jit/crossgen/CMakeLists.txt
new file mode 100644
index 0000000000..8b9c3a3690
--- /dev/null
+++ b/src/jit/crossgen/CMakeLists.txt
@@ -0,0 +1,3 @@
+include(${CLR_DIR}/crossgen.cmake)
+
+add_library(jit_crossgen ${SOURCES})
diff --git a/src/jit/crossgen/jit_crossgen.nativeproj b/src/jit/crossgen/jit_crossgen.nativeproj
new file mode 100644
index 0000000000..f8552dc2f5
--- /dev/null
+++ b/src/jit/crossgen/jit_crossgen.nativeproj
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="dogfood">
+
+ <!--Import the settings-->
+ <Import Project="$(_NTDRIVE)$(_NTROOT)\ndp\clr\xplat\SetCrossGen.props" />
+ <Import Project="$(_NTDRIVE)$(_NTROOT)\ndp\clr\clr.props" />
+
+ <PropertyGroup>
+ <BuildSysBinaries>true</BuildSysBinaries>
+ <OutputName>jit_crossgen</OutputName>
+ <FeatureMergeJitAndEngine>true</FeatureMergeJitAndEngine>
+ <TargetType>LIBRARY</TargetType>
+
+ <ClDefines Condition="'$(BuildArchitecture)' == 'i386'">$(ClDefines);LEGACY_BACKEND</ClDefines>
+ <ClDefines Condition="'$(BuildArchitecture)' == 'arm'">$(ClDefines);LEGACY_BACKEND</ClDefines>
+ </PropertyGroup>
+
+ <Import Project="..\jit.settings.targets" />
+
+</Project>
diff --git a/src/jit/dll/.gitmirror b/src/jit/dll/.gitmirror
new file mode 100644
index 0000000000..f507630f94
--- /dev/null
+++ b/src/jit/dll/.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/dll/CMakeLists.txt b/src/jit/dll/CMakeLists.txt
new file mode 100644
index 0000000000..4c056da191
--- /dev/null
+++ b/src/jit/dll/CMakeLists.txt
@@ -0,0 +1,33 @@
+project(ClrJit)
+
+# Disable the following for UNIX altjit on Windows
+if(CLR_CMAKE_PLATFORM_UNIX)
+ add_compile_options(-Wno-trigraphs)
+ add_compile_options(-fPIC)
+ add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
+
+ add_library(ClrJit
+ STATIC
+ ${SHARED_LIB_SOURCES}
+ )
+ add_dependencies(ClrJit coreclrpal gcinfo)
+else()
+ add_library(ClrJit
+ ${SOURCES}
+ )
+# Disable up to here (see above) the following for UNIX altjit on Windows
+# Enable the following for UNIX altjit on Windows
+# add_library(ClrJit
+# SHARED
+# ${SHARED_LIB_SOURCES}
+# )
+
+# Enable the following for UNIX altjit on Windows
+#target_link_libraries(ClrJit
+# utilcode
+# gcinfo
+# runtime_library
+# )
+
+# Disable the following for UNIX altjit on Windows
+endif(CLR_CMAKE_PLATFORM_UNIX)
diff --git a/src/jit/dll/altjit.def b/src/jit/dll/altjit.def
new file mode 100644
index 0000000000..ec1a3c7a75
--- /dev/null
+++ b/src/jit/dll/altjit.def
@@ -0,0 +1,8 @@
+; ==++==
+;
+; Copyright (c) Microsoft Corporation. All rights reserved.
+;
+; ==--==
+EXPORTS
+ getJit
+ sxsJitStartup \ No newline at end of file
diff --git a/src/jit/dll/clrjit.def b/src/jit/dll/clrjit.def
new file mode 100644
index 0000000000..ec1a3c7a75
--- /dev/null
+++ b/src/jit/dll/clrjit.def
@@ -0,0 +1,8 @@
+; ==++==
+;
+; Copyright (c) Microsoft Corporation. All rights reserved.
+;
+; ==--==
+EXPORTS
+ getJit
+ sxsJitStartup \ No newline at end of file
diff --git a/src/jit/dll/jit.nativeproj b/src/jit/dll/jit.nativeproj
new file mode 100644
index 0000000000..011db75005
--- /dev/null
+++ b/src/jit/dll/jit.nativeproj
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="dogfood">
+
+ <!-- Import the CLR's settings -->
+
+ <Import Project="$(_NTDRIVE)$(_NTROOT)\ndp\clr\clr.props" />
+
+ <PropertyGroup Label="Globals">
+ <SccProjectName>SAK</SccProjectName>
+ <SccAuxPath>SAK</SccAuxPath>
+ <SccLocalPath>SAK</SccLocalPath>
+ <SccProvider>SAK</SccProvider>
+ </PropertyGroup>
+
+ <PropertyGroup>
+
+ <!-- Set the output -->
+
+ <OutputName>clrjit</OutputName>
+ <TargetType Condition="'$(FeatureMergeJitAndEngine)'=='true'">LIBRARY</TargetType>
+ <TargetType Condition="'$(FeatureMergeJitAndEngine)'!='true'">DYNLINK</TargetType>
+ <FileToMarkForSigning>$(BinariesDirectory)\clrjit.dll</FileToMarkForSigning>
+ <StaticLinkJit>false</StaticLinkJit>
+ <BuildCoreBinaries>true</BuildCoreBinaries>
+ <BuildSysBinaries>true</BuildSysBinaries>
+
+ <DllEntryPoint>_DllMainCRTStartup</DllEntryPoint>
+ <LinkSubsystem>windows</LinkSubsystem>
+ <LibCLib Condition="'$(StaticLinkJit)'!='true'">$(ClrCrtLib)</LibCLib>
+
+ <LinkModuleDefinitionFile>$(OutputName).def</LinkModuleDefinitionFile>
+
+ <ClDefines Condition="'$(BuildArchitecture)' == 'i386'">$(ClDefines);LEGACY_BACKEND</ClDefines>
+ <ClDefines Condition="'$(BuildArchitecture)' == 'arm'">$(ClDefines);LEGACY_BACKEND</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 Condition="('$(BuildArchitecture)' == 'arm')">false</PogoOptimize>
+ <PogoInstrument Condition="('$(BuildArchitecture)' == 'arm') and ('$(_BuildType)' == 'ret') and ('$(BuildProjectName)' == '')">true</PogoInstrument>
+ <PogoUpdate Condition="('$(BuildArchitecture)' == 'arm') and ('$(_BuildType)' == 'ret') and ('$(BuildProjectName)' == '')">true</PogoUpdate>
+ <Win32DllLibs Condition="'$(PogoInstrument)' == 'true' and '$(BuildArchitecture)' == 'amd64'">$(Win32DllLibs);$(CrtLibPath)\pgort.lib</Win32DllLibs>
+ <Win32DllLibs Condition="'$(PogoInstrument)' == 'true' and '$(BuildArchitecture)' == 'arm'">$(Win32DllLibs);$(CrtLibPath)\pgort.lib;$(SdkLibPath)\ntdll.lib</Win32DllLibs>
+ <OptimizationDataRelativeDir>$(_BuildArch)\CLR\Base</OptimizationDataRelativeDir>
+
+ <!-- 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 '$(BuildProjectName)' != 'CoreSys'">true</EnableLateDisasm>
+ <!--
+ <EnableLateDisasm Condition="'$(BuildArchitecture)' != 'arm' and '$(BuildProjectName)' != 'CoreSys'">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>
+
+ <!-- For debugging purposes only, temporarily enable these in RET builds so GenTree debugging is easier. -->
+ <!--
+ <ClDefines>$(ClDefines);DEBUGGABLE_GENTREE=1</ClDefines>
+ <ClAdditionalOptions Condition="'$(DebugBuild)' != 'true'">$(ClAdditionalOptions) /Ob0</ClAdditionalOptions>
+ <LinkAdditionalOptions Condition="'$(DebugBuild)' != 'true'">$(LinkAdditionalOptions) /OPT:NOICF</LinkAdditionalOptions>
+ -->
+
+ <!-- Disable merge of text and rdata for DevDiv:696146-->
+ <LinkMergeRData Condition="'$(BuildArchitecture)'=='i386'">false</LinkMergeRData>
+ </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>