Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/gc/CMakeLists.txt
5985 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(gc_sources
24
dllinit.c
25
gctable.c
26
)
27
28
j9vm_add_library(j9gc SHARED
29
OUTPUT_NAME j9gc${J9VM_VERSION_SUFFIX}
30
${gc_sources}
31
)
32
33
if(OMR_TOOLCONFIG STREQUAL "msvc")
34
target_compile_options(j9gc PRIVATE /w34189)
35
endif()
36
37
target_link_libraries(j9gc
38
PRIVATE
39
j9vm_interface
40
41
j9util
42
j9utilcore
43
j9avl
44
j9thr
45
j9stackmap
46
j9pool
47
omrgc #LINKING HACK
48
j9hookable
49
j9gcbase
50
j9gcstructs
51
j9gcstats
52
j9gcapi
53
j9modronstartup
54
j9gctrc
55
j9gctrcstandard
56
j9gctrcvlhgc
57
j9realtime
58
j9gcvlhgc
59
omrgc
60
61
#TODO: this is hack to make linking work.
62
# Need to figure out why we need this in CMake but not UMA
63
j9modronstandard
64
j9gcbase
65
j9hashtable
66
j9gcbase
67
j9modronstandard
68
j9realtime
69
j9gcvlhgc
70
j9gcbase
71
72
j9thr
73
)
74
75
if(OMR_NEED_LIBRT)
76
target_link_libraries(j9gc PRIVATE rt)
77
endif()
78
79
if(OMR_OS_LINUX)
80
target_link_libraries(j9gc PRIVATE pthread)
81
endif()
82
83
target_include_directories(j9gc
84
PUBLIC
85
$<TARGET_PROPERTY:omrgc,INTERFACE_INCLUDE_DIRECTORIES>
86
)
87
88
omr_add_exports(j9gc
89
JVM_OnLoad
90
J9VMDllMain
91
)
92
93
target_enable_ddr(j9gc)
94
ddr_set_add_targets(j9ddr j9gc)
95
96
install(
97
TARGETS j9gc
98
LIBRARY DESTINATION ${j9vm_SOURCE_DIR}
99
RUNTIME DESTINATION ${j9vm_SOURCE_DIR}
100
)
101
102
if(OMR_MIXED_REFERENCES_MODE_STATIC)
103
j9vm_add_library(j9gc_full SHARED
104
OUTPUT_NAME j9gc_full${J9VM_VERSION_SUFFIX}
105
${gc_sources}
106
)
107
108
if(OMR_TOOLCONFIG STREQUAL "msvc")
109
target_compile_options(j9gc_full PRIVATE /w34189)
110
endif()
111
112
target_link_libraries(j9gc_full
113
PRIVATE
114
j9vm_interface
115
116
j9util
117
j9utilcore
118
j9avl
119
j9thr
120
j9stackmap
121
j9pool
122
omrgc_full #LINKING HACK
123
j9hookable
124
j9gcbase_full
125
j9gcstructs_full
126
j9gcstats_full
127
j9gcapi_full
128
j9modronstartup_full
129
j9gctrc_full
130
j9gctrcstandard_full
131
j9gctrcvlhgc_full
132
j9realtime_full
133
j9gcvlhgc_full
134
omrgc_full #LINKING HACK
135
136
#TODO: this is hack to make linking work.
137
# Need to figure out why we need this in CMake but not UMA
138
j9modronstandard_full
139
j9gcbase_full
140
j9hashtable
141
j9gcbase_full
142
j9modronstandard_full
143
j9realtime_full
144
j9gcvlhgc_full
145
j9gcbase_full
146
147
j9thr
148
)
149
150
if(OMR_NEED_LIBRT)
151
target_link_libraries(j9gc_full PRIVATE rt)
152
endif()
153
154
if(OMR_OS_LINUX)
155
target_link_libraries(j9gc_full PRIVATE pthread)
156
endif()
157
158
target_include_directories(j9gc_full
159
PUBLIC
160
$<TARGET_PROPERTY:omrgc_full,INTERFACE_INCLUDE_DIRECTORIES>
161
)
162
163
omr_add_exports(j9gc_full
164
JVM_OnLoad
165
J9VMDllMain
166
)
167
168
install(
169
TARGETS j9gc_full
170
LIBRARY DESTINATION ${j9vm_SOURCE_DIR}
171
RUNTIME DESTINATION ${j9vm_SOURCE_DIR}
172
)
173
endif()
174
175