blob: dce4f59c3a28f8ce84556f4d79e6e5c9a67c6023 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
project(ClrJit)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories("./jitstd")
include_directories("../inc")
# Enable the following for UNIX altjit on Windows
# add_definitions(-DALT_JIT)
set( SOURCES
alloc.cpp
bitset.cpp
block.cpp
compiler.cpp
disasm.cpp
eeinterface.cpp
ee_il_dll.cpp
jiteh.cpp
error.cpp
flowgraph.cpp
gcinfo.cpp
gcdecode.cpp
gcencode.cpp
gentree.cpp
gschecks.cpp
hashbv.cpp
importer.cpp
instr.cpp
lclvars.cpp
liveness.cpp
morph.cpp
optimizer.cpp
optcse.cpp
rationalize.cpp
regalloc.cpp
regset.cpp
register_arg_convention.cpp
emit.cpp
scopeinfo.cpp
sharedfloat.cpp
sm.cpp
smdata.cpp
smweights.cpp
typeinfo.cpp
unwind.cpp
utils.cpp
ssabuilder.cpp
ssarenamestate.cpp
valuenum.cpp
copyprop.cpp
codegencommon.cpp
assertionprop.cpp
rangecheck.cpp
loopcloning.cpp
lower.cpp
lsra.cpp
emitxarch.cpp
targetamd64.cpp
lowerxarch.cpp
codegenxarch.cpp
simd.cpp
simdcodegenxarch.cpp
unwindamd64.cpp
)
if( WIN32 )
# Create .def file containing a list of exports preceeded by
# 'EXPORTS'. The file "ClrJit.exports" already contains the list, so we
# massage it into the correct format here to create "ClrJit.exports.def".
set(CLRJIT_EXPORTS_DEF ${CMAKE_CURRENT_BINARY_DIR}/ClrJit.exports.def)
set(CLRJIT_EXPORTS_DEF_TEMP ${CLRJIT_EXPORTS_DEF}.txt)
file(READ "ClrJit.exports" exports_list)
file(WRITE ${CLRJIT_EXPORTS_DEF_TEMP} "LIBRARY CLRJIT\n")
file(APPEND ${CLRJIT_EXPORTS_DEF_TEMP} "EXPORTS\n")
file(APPEND ${CLRJIT_EXPORTS_DEF_TEMP} ${exports_list})
# Copy the file only if it has changed.
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CLRJIT_EXPORTS_DEF_TEMP} ${CLRJIT_EXPORTS_DEF})
set(SHARED_LIB_SOURCES ${SOURCES} ${CLRJIT_EXPORTS_DEF})
else()
set(SHARED_LIB_SOURCES ${SOURCES})
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(CLR_CMAKE_PLATFORM_UNIX)
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)
|