Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/codert_vm/CMakeLists.txt
5986 views
1
################################################################################
2
# Copyright (c) 2017, 2021 IBM Corp. and others
3
#
4
# This program and the accompanying materials are made available under
5
# the terms of the Eclipse Public License 2.0 which accompanies this
6
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
# or the Apache License, Version 2.0 which accompanies this distribution and
8
# is available at https://www.apache.org/licenses/LICENSE-2.0.
9
#
10
# This Source Code may also be made available under the following
11
# Secondary Licenses when the conditions for such availability set
12
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
# General Public License, version 2 with the GNU Classpath
14
# Exception [1] and GNU General Public License, version 2 with the
15
# OpenJDK Assembly Exception [2].
16
#
17
# [1] https://www.gnu.org/software/classpath/license.html
18
# [2] http://openjdk.java.net/legal/assembly-exception.html
19
#
20
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
################################################################################
22
23
set(OMR_ENHANCED_WARNINGS OFF)
24
25
add_tracegen(j9codertvm.tdf)
26
j9vm_add_library(j9codert_vm STATIC
27
cache.c
28
cnathelp.cpp
29
CodertVMHelpers.cpp
30
decomp.cpp
31
dlt.c
32
fsdcsup.c
33
jitavl.c
34
jithash.cpp
35
jswalk.c
36
thunkcrt.c
37
38
${CMAKE_CURRENT_BINARY_DIR}/ut_j9codertvm.c
39
)
40
41
target_include_directories(j9codert_vm
42
PRIVATE
43
.
44
${CMAKE_CURRENT_BINARY_DIR}
45
${j9vm_SOURCE_DIR}/gc_include
46
${omr_SOURCE_DIR}/gc/include
47
${j9vm_SOURCE_DIR}/compiler/runtime/
48
)
49
50
if(OMR_ARCH_X86)
51
j9vm_gen_asm(xnathelp.m4)
52
53
target_sources(j9codert_vm PRIVATE
54
xnathelp.s
55
)
56
elseif(OMR_ARCH_POWER)
57
j9vm_gen_asm(pnathelp.m4)
58
59
target_sources(j9codert_vm PRIVATE
60
pnathelp.s
61
)
62
elseif(OMR_ARCH_S390)
63
set(m4_defines )
64
if(OMR_OS_ZOS)
65
if(OMR_ENV_DATA64)
66
list(APPEND m4_defines TR_64Bit TR_HOST_64BIT)
67
endif()
68
# NOTE: no flags needed for 31 bit
69
70
71
if(J9VM_JIT_FREE_SYSTEM_STACK_POINTER)
72
list(APPEND m4_defines J9VM_JIT_FREE_SYSTEM_STACK_POINTER)
73
endif()
74
endif()
75
j9vm_gen_asm(znathelp.m4 DEFINES ${m4_defines})
76
77
target_sources(j9codert_vm PRIVATE
78
znathelp.s
79
)
80
elseif(OMR_ARCH_ARM)
81
j9vm_gen_asm(armnathelp.m4)
82
target_sources(j9codert_vm PRIVATE
83
armnathelp.s
84
)
85
elseif(OMR_ARCH_AARCH64)
86
j9vm_gen_asm(arm64nathelp.m4)
87
target_sources(j9codert_vm PRIVATE
88
arm64nathelp.s
89
)
90
elseif(OMR_ARCH_RISCV)
91
j9vm_gen_asm(riscvnathelp.m4)
92
target_sources(j9codert_vm PRIVATE
93
riscvnathelp.s
94
)
95
else()
96
message(SEND_ERROR "Unsupported platform")
97
endif()
98
99
100
if(J9VM_JIT_RUNTIME_INSTRUMENTATION)
101
target_sources(j9codert_vm PRIVATE runtimeInstrumentation.c)
102
endif()
103
104
target_link_libraries(j9codert_vm
105
PRIVATE
106
j9vm_interface
107
j9vm_compiler_defines
108
)
109
110