summaryrefslogtreecommitdiff
path: root/src/jit/legacyjit/CMakeLists.txt
blob: 4a14d0f15bdecce63d62838b78905c261a19ad8b (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
project(legacyjit)

add_definitions(-DLEGACY_BACKEND)
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)

# No SIMD in legacy back-end.
remove_definitions(-DFEATURE_SIMD)

# No hardware intrinsic in legacy back-end.
remove_definitions(-DFEATURE_HW_INTRINSICS)

if(WIN32)
  add_definitions(-DFX_VER_INTERNALNAME_STR=legacyjit.dll)
endif(WIN32)

add_library_clr(legacyjit
   SHARED
   ${SHARED_LIB_SOURCES}
   ${JIT_ARCH_SOURCES}
)

add_dependencies(legacyjit jit_exports)

set_property(TARGET legacyjit APPEND_STRING PROPERTY LINK_FLAGS ${JIT_EXPORTS_LINKER_OPTION})
set_property(TARGET legacyjit 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(legacyjit
   ${RYUJIT_LINK_LIBRARIES}
)

# add the install targets
install_clr(legacyjit)