Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/ddr/CMakeLists.txt
5986 views
1
################################################################################
2
# Copyright (c) 2019, 2020 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
j9vm_add_library(j9ddr_misc SHARED
26
OUTPUT_NAME j9ddr_misc${J9VM_VERSION_SUFFIX}
27
algorithm_versions.c
28
gcddr.cpp
29
jitflagsddr.c
30
omrddr.cpp
31
types.cpp
32
vmddr.cpp
33
)
34
35
target_link_libraries(j9ddr_misc
36
PRIVATE
37
j9vm_interface
38
j9vm_gc_includes
39
)
40
target_include_directories(j9ddr_misc
41
PRIVATE
42
${j9vm_SOURCE_DIR}/
43
${j9vm_SOURCE_DIR}/bcutil
44
${j9vm_BINARY_DIR}/bcutil
45
${j9vm_SOURCE_DIR}/shared_common/include
46
${omr_SOURCE_DIR}/compiler
47
)
48
49
# remove all optimization options so needed debugging information is not suppressed
50
omr_remove_flags(CMAKE_CXX_FLAGS -O -O1 -O2 -O3 /Ox)
51
omr_remove_flags(CMAKE_C_FLAGS -O -O1 -O2 -O3 /Ox)
52
53
if(OMR_TOOLCONFIG STREQUAL "gnu")
54
# defining _FORTIFY_SOURCE is invalid when optimizations are disabled
55
omr_remove_flags(CMAKE_C_FLAGS ${OMR_STRNCPY_FORTIFY_OPTIONS})
56
omr_remove_flags(CMAKE_CXX_FLAGS ${OMR_STRNCPY_FORTIFY_OPTIONS})
57
if(NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
58
target_compile_options(j9ddr_misc PRIVATE -femit-class-debug-always)
59
endif()
60
endif()
61
62
63
if(OMR_OS_AIX)
64
target_link_libraries(j9ddr_misc
65
PRIVATE
66
-Wl,-bexpall
67
)
68
endif()
69
target_enable_ddr(j9ddr_misc)
70
ddr_set_add_targets(j9ddr j9ddr_misc)
71
72
# At least one symbol must be exported, but because this shared library
73
# is only used by ddrgen it doesn't matter which name is exported.
74
omr_add_exports(j9ddr_misc getAlgorithmVersionStructTable)
75
76