diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt new file mode 100644 index 00000000000..33d6ff84171 --- /dev/null +++ b/runtime/CMakeLists.txt @@ -0,0 +1,361 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +cmake_minimum_required(VERSION 3.4 FATAL_ERROR) + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" "${CMAKE_CURRENT_SOURCE_DIR}/omr/cmake/modules" ${CMAKE_MODULE_PATH}) + +set(J9VM_VERSION_MAJOR 2) +set(J9VM_VERSION_MINOR 9) +set(J9VM_VERSION_PATCH 0) +set(J9VM_VERSION ${J9VM_VERSION_MAJOR}.${J9VM_VERSION_MINOR}.${J9VM_VERSION_PATCH}) + +#hack to suppress omr warnings as errors +set(OMR_WARNINGS_AS_ERRORS OFF) + +set(J9VM_JAVA_VERSION "9" CACHE STRING "Version of Java to build") +set_property(CACHE J9VM_JAVA_VERSION PROPERTY STRINGS "8" "9") + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +project(j9vm VERSION ${J9VM_VERSION} LANGUAGES CXX C) +if(CMAKE_CXX_COMPILER_ID STREQUAL "XL") + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") +endif() + + +enable_language(ASM) +#add_definitions(-pthread) +SET(CMAKE_INSTALL_RPATH "\$ORIGIN") + +set(OMR_GLUE_TARGET "j9vm_glue" CACHE STRING "The glue target") +set(OMR_GC_GLUE_TARGET "j9vm_gc_glue" CACHE STRING "") +set(OMR_RAS_GLUE_TARGET "j9vm_ras_glue" CACHE STRING "") +set(OMR_CORE_GLUE_TARGET "j9vm_core_glue" CACHE STRING "") +set(OMR_UTIL_GLUE_TARGET "j9vm_util_glue" CACHE STRING "") + +include(cmake/platform.cmake) +include(cmake/optional_compile.cmake) + + +#TODO should probably rename to j9vm_jit_defines for less ambiguity +add_library(j9vm_compiler_defines INTERFACE) + +if(OMR_ENV_DATA64) + target_compile_definitions(j9vm_compiler_defines INTERFACE TR_64bit TR_HOST_64BIT TR_TARGET_64BIT) +else() + target_compile_definitions(j9vm_compiler_defines INTERFACE TR_HOST_32BIT TR_TARGET_32BIT) +endif() + +if(OMR_ARCH_X86) + target_compile_definitions(j9vm_compiler_defines INTERFACE TR_TARGET_X86 TR_HOST_X86) +elseif(OMR_ARCH_POWER) + target_compile_definitions(j9vm_compiler_defines INTERFACE TR_TARGET_POWER TR_HOST_POWER) +endif() #TODO OTHER PLATFORMS + +#TODO should use findCuda +include_directories( /usr/local/cuda-5.5/include ) + + +#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib") + +add_library(j9vm_interface INTERFACE) + +target_include_directories(j9vm_interface + INTERFACE + oti + include + omr/include_core + nls +) + +#TODO deprecated +add_library(j9vm_nls INTERFACE) +target_include_directories(j9vm_nls + INTERFACE + +) + + +add_library(j9vm_gc_includes INTERFACE) +target_include_directories(j9vm_gc_includes + INTERFACE + $ + ${j9vm_SOURCE_DIR}/gc_include + ${j9vm_SOURCE_DIR}/gc_glue_java + ${j9vm_SOURCE_DIR}/gc_base + ${j9vm_SOURCE_DIR}/gc_stats + ${j9vm_SOURCE_DIR}/gc_structs +) + +#setup OMR library overrides +set(OMR_GC_LIB "j9gc" CACHE STRING "Name of the GC library to use") +set(OMR_HOOK_LIB "j9hookable" CACHE STRING "Name of the hook library to link against") +set(OMR_PORT_LIB "j9prt" CACHE STRING "Name of the port library to link against") +set(OMR_THREAD_LIB "j9thr" CACHE STRING "Name of the thread library to link against") +set(OMR_TRACE_LIB "j9trc" CACHE STRING "Name of the trace library to link against") + +add_subdirectory(gc_glue_java) +add_subdirectory(omr) + +set_target_properties(omrsig PROPERTIES LINKER_LANGUAGE C) + +# Do out hookgen stuff +add_hookgen(oti/j9jit.hdf ${CMAKE_CURRENT_SOURCE_DIR}/oti/jithook.h ${CMAKE_CURRENT_SOURCE_DIR}/oti/jithook_internal.h) +add_hookgen(oti/j9vm.hdf ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmhook.h ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmhook_internal.h) +add_hookgen(oti/zipCachePool.hdf ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmzipcachehook.h ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmzipcachehook_internal.h) + +add_dependencies(j9vm_interface + ${CMAKE_CURRENT_SOURCE_DIR}/oti/jithook.h + ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmhook.h + ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmzipcachehook.h +) + +add_custom_target(j9vm_hookgen + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/oti/jithook.h + ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmhook.h + ${CMAKE_CURRENT_SOURCE_DIR}/oti/vmzipcachehook.h +) +if(TARGET omrglue) + set(J9VM_LEGACY_GLUE 1) +else() + set(J9VM_LEGACY_GLUE 0) +endif() + +set(J9VM_OLD_SHARED_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(CMAKE_SHARED_LIBRARY_SUFFIX "29${CMAKE_SHARED_LIBRARY_SUFFIX}") + +if(J9VM_MODULE_BCUTIL) + add_subdirectory(bcutil) +endif() +if(J9VM_MODULE_BCVERIFY) + add_subdirectory(bcverify) +endif() +if(J9VM_MODULE_CASSUME) + add_subdirectory(cassume) +endif() +if(J9VM_MODULE_CFDUMPER) + add_subdirectory(cfdumper) +endif() +add_subdirectory(clear_vmi) +if(J9VM_MODULE_CODERT_VM) + add_subdirectory(codert_vm) +endif() +add_subdirectory(cuda) +if(J9VM_MODULE_DBGEXT) + add_subdirectory(dbgext) +endif() +#add_subdirectory(ddr_plugin) +#add_subdirectory(ddrext) +if(OMR_HOST_OS STREQUAL "win") + #add_subdirectory(dfix) +endif() +if(J9VM_MODULE_EXELIB) + add_subdirectory(exelib) +endif() +if(J9VM_MODULE_FLSANITY) + add_subdirectory(flsanity) +endif() +if(J9VM_MODULE_GC) + add_subdirectory(gc) +endif() +if(J9VM_MODULE_GC_API) + add_subdirectory(gc_api) +endif() +if(J9VM_MODULE_GC_BASE) + add_subdirectory(gc_base) +endif() +if(J9VM_MODULE_GC_CHECK) + add_subdirectory(gc_check) +endif() +if(J9VM_MODULE_DDR) + #add_subdirectory(gc_ddr) +endif() +if(J9VM_MODULE_GC_MODRON_STANDARD) + add_subdirectory(gc_modron_standard) +endif() +if(J9VM_MODULE_GC_MODRON_STARTUP) + add_subdirectory(gc_modron_startup) +endif() +if(J9VM_MODULE_GC_REALTIME) + add_subdirectory(gc_realtime) +endif() +if(J9VM_MODULE_GC_STACCATO) + add_subdirectory(gc_staccato) +endif() +if(J9VM_MODULE_GC_STATS) + add_subdirectory(gc_stats) +endif() +if(J9VM_MODULE_GC_STRUCTS) + add_subdirectory(gc_structs) +endif() +add_subdirectory(gc_tests) +if(J9VM_MODULE_GC_TRACE) + add_subdirectory(gc_trace) + if(J9VM_MODULE_GC_MODRON_STANDARD) + add_subdirectory(gc_trace_standard) + endif() + if(J9VM_GC_VLHGC) + add_subdirectory(gc_trace_vlhgc) + endif() +endif() +if(J9VM_MODULE_GC_REALTIME) + add_subdirectory(gc_verbose_handler_realtime) +endif() +if(J9VM_MODULE_GC_MODRON_STANDARD) + add_subdirectory(gc_verbose_handler_standard_java) +endif() + +add_subdirectory(gc_verbose_handler_vlhgc) +add_subdirectory(gc_verbose_java) +add_subdirectory(gc_verbose_old) +add_subdirectory(gc_verbose_old_events) +add_subdirectory(gc_vlhgc) +add_subdirectory(gcchk) +add_subdirectory(gdb_plugin) +add_subdirectory(harmony) +#add_subdirectory(hyvm) +add_subdirectory(j9vm) +add_subdirectory(jcl) +if(J9VM_MODULE_JEXTRACTNATIVES) + add_subdirectory(jextractnatives) +endif() +add_subdirectory(jilgen) +add_subdirectory(jit_vm) +add_subdirectory(jnichk) +add_subdirectory(jniinv) +add_subdirectory(jsigWrapper) +add_subdirectory(jvmti) +add_subdirectory(libffi) +add_subdirectory(mgmt) +add_subdirectory(port) +add_subdirectory(rasdump) +add_subdirectory(rastrace) +#add_subdirectory(redirector) +add_subdirectory(runtimetools) +add_subdirectory(shared) +add_subdirectory(shared_common) +add_subdirectory(shared_util) +add_subdirectory(simplepool) +add_subdirectory(stackmap) +add_subdirectory(sunvmi) +add_subdirectory(thrtrace) +if(OMR_HOST_ARCH STREQUAL "x86" OR OMR_HOST_ARCH STREQUAL "ppc") + #jit only does x86 at the moment + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + add_subdirectory(tr.source/trj9) + endif() +endif() + +add_subdirectory(util) +add_subdirectory(util_core) +add_subdirectory(verbose) +add_subdirectory(verutil) +add_subdirectory(vm) +add_subdirectory(vmchk) +#add_subdirectory(win) +#add_subdirectory(win_64) +#add_subdirectory(windbg) +add_subdirectory(zip) +add_subdirectory(zlib) +add_library(j9thr SHARED + $ +) +target_link_libraries(j9thr + PRIVATE + j9pool + j9utilcore + j9vm_interface + PUBLIC + pthread #TODO wrap in platform detection + rt +) + + +add_subdirectory(tests) + +add_library(j9hookable SHARED + $ +) + +target_link_libraries(j9hookable + PRIVATE + j9pool + j9prt + j9thr +) + +install( + TARGETS j9thr j9hookable + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) + +add_library(j9vm_main_wrapper INTERFACE) +target_sources(j9vm_main_wrapper INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/makelib/cmain.c) +target_link_libraries(j9vm_main_wrapper + INTERFACE + j9thr + j9prt +) +set_target_properties( + balloon + bcuwhite + cuda4j + gdb_j9 + hyprtshim + hythr + j9ben + j9dmp + j9gc + j9gcchk + j9hookable + j9jextract + j9jnichk + j9jvmti + j9thr + j9prt + j9vm + j9shr + j9trc + j9vrb + jsig + memorywatcher + migration + osmemory + softmxtest + vmruntimestateagent + j9lazyClassLoad + j9vmchk + j9vmtest + jclse7b_ + jclse9_ + jcoregen + jlmagent + j9ben + jvm + j9thrtestnatives + PROPERTIES + LINKER_LANGUAGE C +) + diff --git a/runtime/bcutil/CMakeLists.txt b/runtime/bcutil/CMakeLists.txt new file mode 100644 index 00000000000..b37a1d96fc9 --- /dev/null +++ b/runtime/bcutil/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9bcu.tdf) +add_library(j9dyn STATIC + bcutil.c + BufferManager.cpp + cfreader.c + ClassFileOracle.cpp + ClassFileParser.cpp + ClassFileWriter.cpp + ComparingCursor.cpp + ConstantPoolMap.cpp + defineclass.c + dynload.c + #j9dynexp.c + J9PortAllocationStrategy.cpp + jimageintf.c + jimagereader.c + jsrinliner.c + ROMClassBuilder.cpp + ROMClassCreationContext.cpp + ROMClassHashTable.c + ROMClassSegmentAllocationStrategy.cpp + ROMClassStringInternManager.cpp + ROMClassWriter.cpp + SRPKeyProducer.cpp + SRPOffsetTable.cpp + StringInternTable.cpp + verifyerrstring.c + WritingCursor.cpp + + #Tracegen + ut_j9bcu.c +) + +target_compile_definitions(j9dyn PRIVATE J9_INTERNAL_TO_VM) + +target_include_directories(j9dyn + PRIVATE + ../omr/include_core + ../shared_common/include + ../nls + ../omr/gc/include + ../gc_include +) + +target_link_libraries(j9dyn + PRIVATE + j9vm_interface + j9hashtable +) + +#add_subdirectory(test) diff --git a/runtime/bcverify/CMakeLists.txt b/runtime/bcverify/CMakeLists.txt new file mode 100644 index 00000000000..4da503865b7 --- /dev/null +++ b/runtime/bcverify/CMakeLists.txt @@ -0,0 +1,62 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +#TODO specify -O3 for zos + +add_tracegen(j9bcverify.tdf) + +add_library(j9bcv_tracegen OBJECT + ${CMAKE_CURRENT_BINARY_DIR}/ut_j9bcverify.c +) +target_include_directories(j9bcv_tracegen + PRIVATE + $ +) + + +add_library(j9bcv STATIC + bcverify.c + clconstraints.c + rtverify.c + staticverify.c + vrfyconvert.c + vrfyhelp.c + #${CMAKE_CURRENT_BINARY_DIR}/ + $ +) + +target_link_libraries(j9bcv + PRIVATE + j9vm_interface + j9vm_nls + j9vm_gc_includes + + j9verutil + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9thr + j9stackmap + j9shrcommon +) diff --git a/runtime/cachefile.cmake.ftl b/runtime/cachefile.cmake.ftl new file mode 100644 index 00000000000..1066d909e48 --- /dev/null +++ b/runtime/cachefile.cmake.ftl @@ -0,0 +1,164 @@ +################################################################################ +# Copyright (c) 1991, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +set(OMR_OPT_CUDA ${uma.spec.flags.opt_cuda.enabled?string("ON","OFF")} CACHE BOOL "") + + +set(OMR_GC_COMPRESSED_POINTERS ${uma.spec.flags.gc_compressedPointers.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_DYNAMIC_CLASS_UNLOADING ${uma.spec.flags.gc_dynamicClassUnloading.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_HYBRID_ARRAYLETS ${uma.spec.flags.gc_hybridArraylets.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_IDLE_HEAP_MANAGER ${uma.spec.flags.gc_idleHeapManager.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_LEAF_BITS ${uma.spec.flags.gc_leafBits.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_MODRON_COMPACTION ${uma.spec.flags.gc_modronCompaction.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_MODRON_CONCURRENT_MARK ${uma.spec.flags.gc_modronConcurrentMark.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_MODRON_SCAVENGER ${uma.spec.flags.gc_modronScavenger.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_REALTIME ${uma.spec.flags.gc_realtime.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_SEGREGATED_HEAP ${uma.spec.flags.gc_segregatedHeap.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_STACCATO ${uma.spec.flags.gc_staccato.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_TLH_PREFETCH_FTA ${uma.spec.flags.gc_tlhPrefetchFTA.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_GC_VLHGC ${uma.spec.flags.gc_vlhgc.enabled?string("ON","OFF")} CACHE BOOL "") + +set(OMR_INTERP_COMPRESSED_OBJECT_HEADER ${uma.spec.flags.interp_compressedObjectHeader.enabled?string("ON","OFF")} CACHE BOOL "") +set(OMR_INTERP_SMALL_MONITOR_SLOT ${uma.spec.flags.interp_smallMonitorSlot.enabled?string("ON","OFF")} CACHE BOOL "") + +set(J9VM_PORT_RUNTIME_INSTRUMENTATION ${uma.spec.flags.port_runtimeInstrumentation.enabled?string("ON","OFF")} CACHE BOOL "") + +#TODO these options to be properly configured like the rest +set(OMR_GC_ARRAYLETS ON CACHE BOOL "") +set(OMR_GC_CONCURRENT_SWEEP ON CACHE BOOL "") +set(OMR_PORT_ASYNC_HANDLER ON CACHE BOOL "") +set(OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS ON CACHE BOOL "") +set(OMR_PORT_NUMA_SUPPORT ON CACHE BOOL "") +set(OMR_THR_JLM ON CACHE BOOL "") +set(OMR_THR_YIELD_ALG ON CACHE BOOL "") +set(OMR_THR_SPIN_WAKE_CONTROL ON CACHE BOOL "") +set(OMR_THR_CUSTOM_SPIN_OPTIONS ON CACHE BOOL "") +set(OMR_NOTIFY_POLICY_CONTROL ON CACHE BOOL "") +set(OMR_THR_THREE_TIER_LOCKING ON CACHE BOOL "") +set(J9VM_OPT_MEMORY_CHECK_SUPPORT ON CACHE BOOL "") +set(J9VM_OPT_REMOTE_CONSOLE_SUPPORT ON CACHE BOOL "") +set(J9VM_GC_VLHGC ON CACHE BOOL "") + + +set(J9VM_MODULE_JEXTRACTNATIVES ${uma.spec.flags.module_jextractnatives.enabled?string("ON","OFF")} CACHE BOOL "") + +set(J9VM_MODULE_ALGORITHM_TEST ${uma.spec.flags.module_algorithm_test.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_BCUTIL ${uma.spec.flags.module_bcutil.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_BCVERIFY ${uma.spec.flags.module_bcverify.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CALLCONV ${uma.spec.flags.module_callconv.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CASSUME ${uma.spec.flags.module_cassume.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CFDUMPER ${uma.spec.flags.module_cfdumper.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CODEGEN_COMMON ${uma.spec.flags.module_codegen_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CODEGEN_IA32 ${uma.spec.flags.module_codegen_ia32.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CODEGEN_ILGEN ${uma.spec.flags.module_codegen_ilgen.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CODEGEN_OPT ${uma.spec.flags.module_codegen_opt.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CODERT_COMMON ${uma.spec.flags.module_codert_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CODERT_IA32 ${uma.spec.flags.module_codert_ia32.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CODERT_VM ${uma.spec.flags.module_codert_vm.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CPO_COMMON ${uma.spec.flags.module_cpo_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_CPO_CONTROLLER ${uma.spec.flags.module_cpo_controller.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_DBGEXT ${uma.spec.flags.module_dbgext.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_DBGINFOSERV ${uma.spec.flags.module_dbginfoserv.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_DDR ${uma.spec.flags.module_ddr.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_EXE ${uma.spec.flags.module_exe.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_EXELIB ${uma.spec.flags.module_exelib.enabled?string("ON","OFF")} CACHE BOOL "") + + +# + +set(J9VM_MODULE_GC ${uma.spec.flags.module_gc.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_API ${uma.spec.flags.module_gc_api.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_BASE ${uma.spec.flags.module_gc_base.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_CHECK ${uma.spec.flags.module_gc_check.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_COMMON ${uma.spec.flags.module_gc_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_MODRON_BASE ${uma.spec.flags.module_gc_modron_base.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_MODRON_EPROF ${uma.spec.flags.module_gc_modron_eprof.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_MODRON_STANDARD ${uma.spec.flags.module_gc_modron_standard.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_MODRON_STARTUP ${uma.spec.flags.module_gc_modron_startup.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_REALTIME ${uma.spec.flags.module_gc_realtime.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_STACCATO ${uma.spec.flags.module_gc_staccato.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_STATS ${uma.spec.flags.module_gc_stats.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_STRUCTS ${uma.spec.flags.module_gc_structs.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_TRACE ${uma.spec.flags.module_gc_trace.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_UTIL ${uma.spec.flags.module_gc_util.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GC_UTIL ${uma.spec.flags.module_gc_util.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GCCHK ${uma.spec.flags.module_gcchk.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GDB ${uma.spec.flags.module_gdb.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GDB_PLUGIN ${uma.spec.flags.module_gdb_plugin.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_GPTEST ${uma.spec.flags.module_gptest.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_J9VM ${uma.spec.flags.module_j9vm.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_J9VMTEST ${uma.spec.flags.module_j9vmtest.enabled?string("ON","OFF")} CACHE BOOL "") + + +# +# + +set(J9VM_MODULE_JEXTRACTNATIVES ${uma.spec.flags.module_jextractnatives.enabled?string("ON","OFF")} CACHE BOOL "") + +set(J9VM_MODULE_JIT_COMMON ${uma.spec.flags.module_jit_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JIT_IA32 ${uma.spec.flags.module_jit_ia32.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JIT_VM ${uma.spec.flags.module_jit_vm.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JITDEBUG_COMMON ${uma.spec.flags.module_jitdebug_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JITRT_COMMON ${uma.spec.flags.module_jitrt_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JITRT_IA32 ${uma.spec.flags.module_jitrt_ia32.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JNIARGTESTS ${uma.spec.flags.module_jniargtests.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JNICHK ${uma.spec.flags.module_jnichk.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JNIINV ${uma.spec.flags.module_jniinv.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JNITEST ${uma.spec.flags.module_jnitest.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JSIG ${uma.spec.flags.module_jsig.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JVMTI ${uma.spec.flags.module_jvmti.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_JVMTITST ${uma.spec.flags.module_jvmtitst.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_LIFECYCLE_TESTS ${uma.spec.flags.module_lifecycle_tests.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_MASM2GAS ${uma.spec.flags.module_masm2gas.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_MVMTEST ${uma.spec.flags.module_mvmtest.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_PORTTEST ${uma.spec.flags.module_porttest.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_RASDUMP ${uma.spec.flags.module_rasdump.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_RASTRACE ${uma.spec.flags.module_rastrace.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_SHARED ${uma.spec.flags.module_shared.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_SHARED_COMMON ${uma.spec.flags.module_shared_common.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_SHARED_TEST ${uma.spec.flags.module_shared_test.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_SHARED_UTIL ${uma.spec.flags.module_shared_util.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_UTE ${uma.spec.flags.module_ute.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_UTETEST ${uma.spec.flags.module_utetst.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_VERBOSE ${uma.spec.flags.module_verbose.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_VMALL ${uma.spec.flags.module_vmall.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_ZIP ${uma.spec.flags.module_zip.enabled?string("ON","OFF")} CACHE BOOL "") +set(J9VM_MODULE_ZLIB ${uma.spec.flags.module_zlib.enabled?string("ON","OFF")} CACHE BOOL "") + +set(CMAKE_C_COMPILER ${uma.spec.properties.uma_make_cmd_cc.value} CACHE STRING "") + +<#if uma.spec.properties.uma_make_cmd_cxx.value == "$(CC)"> +set(CMAKE_CXX_COMPILER ${uma.spec.properties.uma_make_cmd_cc.value} CACHE STRING "") +<#else > +set(CMAKE_CXX_COMPILER ${uma.spec.properties.uma_make_cmd_cxx.value} CACHE STRING "") + + +#for weird platforms where we compile C with the C++ compiler +<#if uma.spec.properties.uma_make_cmd_cxx_dll_ld.value == "$(CC)"> +set(CMAKE_C_CREATE_SHARED_LIBRARY "${uma.spec.properties.uma_make_cmd_cc.value} -o " CACHE STRING "") +<#else > +set(CMAKE_C_CREATE_SHARED_LIBRARY "${uma.spec.properties.uma_make_cmd_cxx_dll_ld.value} -o " CACHE STRING "") + + +#Prefer the C linker +set(CMAKE_C_LINKER_PREFERENCE 10 CACHE STRING "") +set(CMAKE_CXX_LINKER_PREFERENCE 1 CACHE STRING "") diff --git a/runtime/cassume/CMakeLists.txt b/runtime/cassume/CMakeLists.txt new file mode 100644 index 00000000000..db9ef63d363 --- /dev/null +++ b/runtime/cassume/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(ctest + basesize.c + ctest.c + vatest.c +) + +target_link_libraries(ctest + PRIVATE + j9vm_main_wrapper + j9vm_compiler_defines + + j9prt + j9exelib + j9util + j9utilcore + j9avl + j9hashtable + j9thr + j9pool +) + +install( + TARGETS ctest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/cfdumper/CMakeLists.txt b/runtime/cfdumper/CMakeLists.txt new file mode 100644 index 00000000000..8ac60007651 --- /dev/null +++ b/runtime/cfdumper/CMakeLists.txt @@ -0,0 +1,62 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(cfdump + main.c + pvdump.c + romdump.c + + $ + ../vm/stringhelpers.cpp + ../vm/KeyHashTable.c + ../vm/ModularityHashTables.c + ../vm/dllsup.c +) + +target_link_libraries(cfdump + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_main_wrapper + + j9verutil + j9exelib + j9dyn + j9bcv + j9simplepool + j9util + j9utilcore + j9avl + j9hashtable + j9hookable + j9zip + j9pool + j9prt + j9stackmap + j9thr + j9zlib +) + +install( + TARGETS cfdump + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/clear_vmi/CMakeLists.txt b/runtime/clear_vmi/CMakeLists.txt new file mode 100644 index 00000000000..039900134ff --- /dev/null +++ b/runtime/clear_vmi/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9vmi STATIC + j9vmi_harmony.c + j9vmi_j9.c +) + +target_include_directories(j9vmi + PRIVATE + ../omr/include_core +) + +target_link_libraries(j9vmi + PRIVATE + j9vm_interface + #j9vm + #j9hookable + #j9zip + #j9pool + #j9utilcore +) diff --git a/runtime/cmake/modules/CMakeDetermineJ9VM_C_ALTCompiler.cmake b/runtime/cmake/modules/CMakeDetermineJ9VM_C_ALTCompiler.cmake new file mode 100644 index 00000000000..00daca089b8 --- /dev/null +++ b/runtime/cmake/modules/CMakeDetermineJ9VM_C_ALTCompiler.cmake @@ -0,0 +1,16 @@ +#include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) +set(CMAKE_J9VM_C_ALT_COMPILER_LIST gcc-4.6) +#set(CMAKE_J9VM_C_ALT_COMPILER gcc-4.6) +set(CMAKE_J9VM_C_ALT_COMPILER_ENV_VAR J9ALTC) +#_cmake_find_compiler_path(J9VM_C_ALT) +find_program(CMAKE_J9VM_C_ALT_COMPILER "gcc-4.6") + +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeJ9VM_C_ALTCompiler.cmake.in +${CMAKE_PLATFORM_INFO_DIR}/CMakeJ9VM_C_ALTCompiler.cmake @ONLY) + + +set(CMAKE_J9VM_C_ALT_DEFINE_FLAG -D) +set(CMAKE_INCLUDE_FLAG_J9VM_C_ALT -I) +set(CMAKE_J9VM_C_ALT_OUTPUT_EXTENSION .o) + +set(CMAKE_J9VM_C_ALT_COMPILE_OBJECT "foobar -o -c ") diff --git a/runtime/cmake/modules/CMakeJ9VM_C_ALTCompiler.cmake.in b/runtime/cmake/modules/CMakeJ9VM_C_ALTCompiler.cmake.in new file mode 100644 index 00000000000..118c6564fe4 --- /dev/null +++ b/runtime/cmake/modules/CMakeJ9VM_C_ALTCompiler.cmake.in @@ -0,0 +1,16 @@ + +set(CMAKE_J9VM_C_ALT_COMPILER "@CMAKE_J9VM_C_ALT_COMPILER@") +set(CMAKE_J9VM_C_ALT_COMPILER_ARG1 "@_CMAKE_ASM_COMPILER_ARG1@") +set(CMAKE_AR "@CMAKE_AR@") +#set(CMAKE_J9VM_C_ALT_COMPILER_AR "@_CMAKE_ASM_COMPILER_AR@") +set(CMAKE_RANLIB "@CMAKE_RANLIB@") +#set(CMAKE_J9VM_C_ALT_COMPILER_RANLIB "@_CMAKE_ASM_COMPILER_RANLIB@") +set(CMAKE_LINKER "@CMAKE_LINKER@") +set(CMAKE_J9VM_C_ALT_COMPILER_LOADED 1) +set(CMAKE_J9VM_C_ALT_COMPILER_ID gcc) +#set(CMAKE_J9VM_C_ALT_COMPILER_VERSION "@_CMAKE_ASM_COMPILER_VERSION@") +#set(CMAKE_J9VM_C_ALT_COMPILER_ENV_VAR "@CMAKE_J9VM_C_ALT_COMPILER_ENV_VAR@") + +set(CMAKE_J9VM_C_ALT_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_J9VM_C_ALT_LINKER_PREFERENCE 0) + diff --git a/runtime/cmake/modules/CMakeJ9VM_C_ALTInformation.cmake b/runtime/cmake/modules/CMakeJ9VM_C_ALTInformation.cmake new file mode 100644 index 00000000000..7c014798870 --- /dev/null +++ b/runtime/cmake/modules/CMakeJ9VM_C_ALTInformation.cmake @@ -0,0 +1,4 @@ +set(CMAKE_J9VM_C_ALT_DEFINE_FLAG -D) +set(CMAKE_INCLUDE_FLAG_J9VM_C_ALT -I) +set(CMAKE_J9VM_C_ALT_OUTPUT_EXTENSION .o) +set(CMAKE_J9VM_C_ALT_COMPILE_OBJECT " -o -c ") diff --git a/runtime/cmake/modules/CMakeTestJ9VM_C_ALTCompiler.cmake b/runtime/cmake/modules/CMakeTestJ9VM_C_ALTCompiler.cmake new file mode 100644 index 00000000000..e4088514801 --- /dev/null +++ b/runtime/cmake/modules/CMakeTestJ9VM_C_ALTCompiler.cmake @@ -0,0 +1 @@ +SET(CMAKE_J9VM_C_ALT_COMPILER_WORKS 1 CACHE INTERNAL "") \ No newline at end of file diff --git a/runtime/cmake/optional_compile.cmake b/runtime/cmake/optional_compile.cmake new file mode 100644 index 00000000000..4dd04aeb96a --- /dev/null +++ b/runtime/cmake/optional_compile.cmake @@ -0,0 +1,30 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +function(j9vm_optional_compile tgt type) + foreach(sourcefile IN ITEMS ${ARGN}) + get_filename_component(real_file "${sourcefile}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + if(EXISTS "${real_file}") + target_sources(${tgt} ${type} ${sourcefile}) + endif() + endforeach(sourcefile) +endfunction(j9vm_optional_compile) diff --git a/runtime/cmake/options.cmake b/runtime/cmake/options.cmake new file mode 100644 index 00000000000..78c401427ef --- /dev/null +++ b/runtime/cmake/options.cmake @@ -0,0 +1,105 @@ +cmake_dependent_option(J9VM_INTERP_AOT_COMPILE_SUPPORT "Controls if the AOT compilation support is included in the VM" OFF "J9VM_INTERP_NATIVE_SUPPORT" OFF) +cmake_dependent_option(J9VM_INTERP_AOT_RUNTIME_SUPPORT "Controls if the AOT runtime support is included in the VM" OFF "J9VM_INTERP_NATIVE_SUPPORT" OFF) +option(J9VM_INTERP_ATOMIC_FREE_JNI "Use the new atomic-free JNI support") +cmake_dependent_option(J9VM_INTERP_BYTECODE_PREVERIFICATION "Does this VM support 1st pass bytecode verification (able to dynamically generate pre-verify data)" OFF "J9VM_INTERP_BYTECODE_VERIFICATION" OFF) +option(J9VM_INTERP_BYTECODE_VERIFICATION "Does this VM support 2nd pass bytecode verification (pre-verify data in .jxe only)") + + +option(J9VM_INTERP_DEBUG_SUPPORT "Controls if a debugging support is included in the VM.") +option(J9VM_INTERP_ENABLE_JIT_ON_DESKTOP "TEMPORARY FLAG for arm test environment") + + +option(J9VM_INTERP_FLOAT_SUPPORT "Determines if float and double data types are supported by the VM.") + + +option(J9VM_INTERP_GP_HANDLER "Determines if protection faults are caught by the VM and handled cleanly.") +option(J9VM_INTERP_GP_GROWABLE_STACKS "Enables dynamic java stack growing") + + +option(J9VM_INTERP_JIT_ON_BY_DEFAULT "Turns JIT on by default") +option(J9VM_INTERP_JNI_SUPPORT "Determines if JNI native support is available.") + + + +option(J9VM_INTERP_NATIVE_SUPPORT "Controls if the native translator is included in the VM.") +option(J9VM_INTERP_NEW_HEADER_SHAPE "Temporary flag for experimentation with the object header shape.") +option(J9VM_INTERP_PROFILING_BYTECODES "If enabled, profiling versions of branch and call bytecodes are available. These gather additional info for the JIT for optimal code generation") +option(J9VM_INTERP_ROMABLE_AOT_SUPPORT "ROMable AOT Support for TJ Watson") + + +option(J9VM_INTERP_TRACING "DEBUGGING FEATURE. Determines if the interpreter produces debug information at every bytecode.") + + +option(J9VM_INTERP_USE_SPLIT_SIDE_TABLES "Use split side tables for handling constant pool entry shared between multiple invoke bytecodes") +option(J9VM_INTERP_USE_UNSAFE_HELPER "If set, use helper functions in UnsafeAPI to access native memory") +option(J9VM_INTERP_VERBOSE "Determines if verbose reporting is available. (ie. -verbose)") + +option(J9VM_MODULE_A2E "Enables compilation of the a2e module.") +option(J9VM_MODULE_ALGORITHM_TEST "Enables compilation of the algorithm_test module.") +option(J9VM_MODULE_AMS "Enables compilation of the ams module.") +option(J9VM_MODULE_AOTRT_COMMON "Enables compilation of the aotrt_common module.") +option(J9VM_MODULE_ASMUTIL "Enables compilation of the asmutil module.") + +option(J9VM_MODULE_BCUTIL "Enables compilation of the bcutil module.") +option(J9VM_MODULE_BCVERIFY "Enables compilation of the bcverify module.") + + + +option(J9VM_MODULE_CASSUME "Enables compilation of the cassume module.") +option(J9VM_MODULE_CFDUMPER "Enables compilation of the cfdumper module.") + + + +option(J9VM_MODULE_DBG "Enables compilation of the dbg module.") +option(J9VM_MODULE_DBGEXT "Enables compilation of the dbgext module.") + + + + +option(J9VM_MODULE_EXELIB "Enables compilation of the exelib module.") + + +option(J9VM_MODULE_VM "Enables compilation of the vm module.") +option(J9VM_MODULE_VMALL "Enables compilation of the vmall module.") +option(J9VM_MODULE_WINDBG "Enables compilation of the windbg module.") +option(J9VM_MODULE_ZIP "Enables compilation of the zip module.") +option(J9VM_MODULE_ZLIB "Enables compilation of the zlib module.") + + + +option(J9VM_OPT_CUDA "Add support for CUDA") + + +option(J9VM_OPT_DYNAMIC_LOAD_SUPPORT "Determines if the dynamic loader is included.") +option(J9VM_OPT_FIPS "Add supports for FIPs") +option(J9VM_OPT_FRAGMENT_RAM_CLASSES "Transitional flag for the the GC during the switch to fragmented RAM class allocation") +option(J9VM_OPT_HARMONY "Support the Open Source Harmony project") + + +cmake_dependent_option(J9VM_OPT_JVMTI "Support for the JVMTI interface" OFF "J9VM_DEBUG_INFO_SERVER" OFF) +cmake_dependent_option(J9VM_OPT_JXE_LOAD_SUPPORT "Controls if main will allow -jxe: and relocate the disk image for you." OFF "J9VM_OPT_ROM_IMAGE_SUPPORT") + + +option(J9VM_OPT_METHOD_HANDLE "Turns on methodhandle support") +option(J9VM_OPT_MODULE "Turns on module support") +option(J9VM_OPT_MULTI_VM "Decides if multiple VMs can be created in the same address space") + + +option(J9VM_OPT_PANAMA "Enables support for Project Panama features such as native method handles") +option(J9VM_OPT_VALHALLA_MVT "Enables support for Project Valhalla Minimal Value Types") +option(J9VM_OPT_VALHALLA_NESTMATES "Enables support for Project Valhalla Nest Mates") + + +option(J9VM_OPT_ROM_IMAGE_SUPPORT "Controls if the VM includes basic support for linked rom images") +cmake_dependent_option(J9VM_OPT_SHARED_CLASSES "Support for class sharing" OFF "J9VM_INTERP_JNI_SUPPORT" OFF) + +option(J9VM_OPT_ZIP_SUPPORT "Controls if the VM includes zip reading and caching support. (implies dynamic loading)") +cmake_dependent_option(J9VM_OPT_ZLIB_COMPRESSION "Controls if the compression routines in zlib are included." OFF "J9VM_OPT_ZLIB_SUPPORT" OFF) +option(J9VM_OPT_ZLIB_SUPPORT "Controls if the VM includes the zlib compression library.") + +option(J9VM_PORT_RUNTIME_INSTRUMENTATION "Controls whether runtime instrumentation support exists on this platform.") + + + +option(J9VM_RAS_DUMP_AGENTS "Support multiple dump agents, instead of just console dump.") +option(J9VM_RAS_EYE_CATCHERS "Add eyecatcher blocks to key structures") diff --git a/runtime/cmake/platform.cmake b/runtime/cmake/platform.cmake new file mode 100644 index 00000000000..af6751a84b6 --- /dev/null +++ b/runtime/cmake/platform.cmake @@ -0,0 +1,66 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +#TODO we are assuming liunx at the moment +if(CMAKE_CXX_COMPILER_ID STREQUAL "XL") + set(OMR_TOOLCONFIG "xlc") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -q64 -qalias=noansi") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -q64 -qalias=noansi -qnortti -qnoeh -qsuppress=1540-1087:1540-1088:1540-1090") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -qpic=large -q64") +endif() + +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(CMAKE_CXX_FLAGS " -g -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}") + set(CMAKE_C_FLAGS "-g ${CMAKE_C_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,defs ${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread -O3 -fno-strict-aliasing") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -O3 -fno-strict-aliasing -fno-exceptions -fno-rtti -fno-threadsafe-statics") +endif() + +include(OmrPlatform) +omr_detect_system_information() + +if(OMR_ARCH_X86) + #TODO check for 64 bit + add_definitions( + -DJ9HAMMER + ) +elseif(OMR_ARCH_POWER) + add_definitions(-DLINUXPPC64 -DPPC64 -DLINUXPPC) + #TODO do based on toolchain stuff + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + add_definitions(-DOMR_ENV_GCC) + endif() + #TODO this is a hack + set(J9VM_JIT_RUNTIME_INSTRUMENTATION ON CACHE BOOL "") + set(J9VM_PORT_RUNTIME_INSTRUMENTATION ON CACHE BOOL "") +endif() + +add_definitions( +-DLINUX +-D_REENTRANT +-DFILE_OFFSET_BITS=64 +-DIPv6_FUNCTION_SUPPORT +-DUT_DIRECT_TRACE_REGISTRATION +"-DJAVA_SPEC_VERSION=${J9VM_JAVA_VERSION}" +) + diff --git a/runtime/codert_vm/CMakeLists.txt b/runtime/codert_vm/CMakeLists.txt new file mode 100644 index 00000000000..6073d1675d8 --- /dev/null +++ b/runtime/codert_vm/CMakeLists.txt @@ -0,0 +1,79 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9codert_vm STATIC + cache.c + cnathelp.cpp + CodertVMHelpers.cpp + decomp.cpp + dlt.c + fsdcsup.c + jitavl.c + jithash.cpp + jsr292.c + jswalk.c + thunkcrt.c + ut_j9codertvm.c +) + +target_include_directories(j9codert_vm + PRIVATE + . + ${PROJECT_SOURCE_DIR}/oti + ${PROJECT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/gc_include + ${PROJECT_SOURCE_DIR}/omr/include_core + ${PROJECT_SOURCE_DIR}/omr/gc/include + ${PROJECT_SOURCE_DIR}/nls + ${PROJECT_SOURCE_DIR}/tr.source/trj9/runtime/ +) + +if(OMR_ARCH_X86) + add_custom_command( + OUTPUT xnathelp.s + DEPENDS xnathelp.m4 run_constgen + COMMAND m4 -I${CMAKE_CURRENT_SOURCE_DIR}/../oti ${CMAKE_CURRENT_SOURCE_DIR}/xnathelp.m4 > xnathelp.s + ) + + # conditionalize this in the future + target_sources(j9codert_vm PRIVATE + xnathelp.s + ) +elseif(OMR_ARCH_POWER) + add_custom_command( + OUTPUT pnathelp.s + DEPENDS pnathelp.m4 run_constgen + COMMAND m4 -I${CMAKE_CURRENT_SOURCE_DIR}/../oti ${CMAKE_CURRENT_SOURCE_DIR}/pnathelp.m4 > pnathelp.s + ) + + # conditionalize this in the future + target_sources(j9codert_vm PRIVATE + pnathelp.s + ) +endif() + + +if(J9VM_JIT_RUNTIME_INSTRUMENTATION) + target_sources(j9codert_vm PRIVATE runtimeInstrumentation.c) +endif() + +target_link_libraries(j9codert_vm PRIVATE j9vm_compiler_defines) diff --git a/runtime/cuda/CMakeLists.txt b/runtime/cuda/CMakeLists.txt new file mode 100644 index 00000000000..4a95ed7d705 --- /dev/null +++ b/runtime/cuda/CMakeLists.txt @@ -0,0 +1,48 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(cuda4j.tdf) + +add_library(cuda4j SHARED + CudaBuffer.cpp + CudaCommon.cpp + CudaDevice.cpp + CudaEvent.cpp + CudaFunction.cpp + CudaJitOptions.cpp + CudaLinker.cpp + CudaModule.cpp + CudaStream.cpp + + ut_cuda4j.c +) + +target_link_libraries(cuda4j + PRIVATE + j9vm_interface + j9util +) + +install( + TARGETS cuda4j + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/dbgext/CMakeLists.txt b/runtime/dbgext/CMakeLists.txt new file mode 100644 index 00000000000..af4b5aabfc4 --- /dev/null +++ b/runtime/dbgext/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9dbgext STATIC + dbgpool.c + j9dbgext.c + trdbgext.c +) + +target_include_directories(j9dbgext + PUBLIC + . +) + +target_compile_definitions(j9dbgext + PRIVATE + J9VM_INTERP_STACKWALK_TRACING + J9VM_INTERP_LINEAR_STACKWALK_TRACING + J9VM_OUT_OF_PROCESS + -DUT_TRACE_OVERHEAD=0 +) + +target_link_libraries(j9dbgext + PRIVATE + j9vm_interface + j9vm_compiler_defines +) + diff --git a/runtime/dfix/test/CMakeLists.txt b/runtime/dfix/test/CMakeLists.txt new file mode 100644 index 00000000000..18017378c0e --- /dev/null +++ b/runtime/dfix/test/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(dfixtest + main.cpp +) + +target_link_libraries(dfixtest + PRIVATE + j9vm_interface +) \ No newline at end of file diff --git a/runtime/exelib/CMakeLists.txt b/runtime/exelib/CMakeLists.txt new file mode 100644 index 00000000000..b6be6a94425 --- /dev/null +++ b/runtime/exelib/CMakeLists.txt @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9exelib STATIC + common/libargs.c + common/libhlp.c + common/strbuf.c +) + +if(J9VM_OPT_MEMORY_CHECK_SUPPORT) + target_sources(j9exelib PRIVATE common/memcheck.c) +endif() + +if(J9VM_OPT_REMOTE_CONSOLE_SUPPORT) + target_sources(j9exelib PRIVATE common/rconsole.c) +endif() + +target_link_libraries(j9exelib + PRIVATE + j9vm_interface + + j9hashtable +) diff --git a/runtime/flsanity/CMakeLists.txt b/runtime/flsanity/CMakeLists.txt new file mode 100644 index 00000000000..44b53b07347 --- /dev/null +++ b/runtime/flsanity/CMakeLists.txt @@ -0,0 +1,143 @@ +add_executable(floatsanityg + # fl_BE.c + # fl_BE_java_lang_Math_abs_double.c + # fl_BE_java_lang_Math_abs_float.c + # fl_BE_java_lang_Math_acos.c + # fl_BE_java_lang_Math_asin.c + # fl_BE_java_lang_Math_atan.c + # fl_BE_java_lang_Math_atan2.c + # fl_BE_java_lang_Math_ceil_double.c + # fl_BE_java_lang_Math_cos.c + # fl_BE_java_lang_Math_exp.c + # fl_BE_java_lang_Math_floor_double.c + # fl_BE_java_lang_Math_IEEEremainder_double.c + # fl_BE_java_lang_Math_log.c + # fl_BE_java_lang_Math_max_double_double.c + # fl_BE_java_lang_Math_max_float_float.c + # fl_BE_java_lang_Math_min_double_double.c + # fl_BE_java_lang_Math_min_float_float.c + # fl_BE_java_lang_Math_pow.c + # fl_BE_java_lang_Math_rint_double.c + # fl_BE_java_lang_Math_round_double.c + # fl_BE_java_lang_Math_round_float.c + # fl_BE_java_lang_Math_sin.c + # fl_BE_java_lang_Math_sqrt_double.c + # fl_BE_java_lang_Math_tan.c + # fl_BE_java_lang_Math_toDegrees_double.c + # fl_BE_java_lang_Math_toRadians_double.c + # fl_BE_java_lang_StrictMath_acos.c + # fl_BE_java_lang_StrictMath_asin.c + # fl_BE_java_lang_StrictMath_atan.c + # fl_BE_java_lang_StrictMath_atan2.c + # fl_BE_java_lang_StrictMath_cos.c + # fl_BE_java_lang_StrictMath_exp.c + # fl_BE_java_lang_StrictMath_log.c + # fl_BE_java_lang_StrictMath_pow.c + # fl_BE_java_lang_StrictMath_sin.c + # fl_BE_java_lang_StrictMath_tan.c + # fl_BE_JBd2f.c + # fl_BE_JBd2i.c + # fl_BE_JBd2l.c + # fl_BE_JBdadd.c + # fl_BE_JBdcmpg.c + # fl_BE_JBdcmpl.c + # fl_BE_JBddiv.c + # fl_BE_JBdmul.c + # fl_BE_JBdneg.c + # fl_BE_JBdrem.c + # fl_BE_JBdsub.c + # fl_BE_JBf2d.c + # fl_BE_JBf2i.c + # fl_BE_JBf2l.c + # fl_BE_JBfadd.c + # fl_BE_JBfcmpg.c + # fl_BE_JBfcmpl.c + # fl_BE_JBfdiv.c + # fl_BE_JBfmul.c + # fl_BE_JBfneg.c + # fl_BE_JBfrem.c + # fl_BE_JBfsub.c + # fl_BE_JBi2d.c + # fl_BE_JBi2f.c + # fl_BE_JBl2d.c + # fl_BE_JBl2f.c + fl_LE.c + fl_LE_java_lang_Math_abs_double.c + fl_LE_java_lang_Math_abs_float.c + fl_LE_java_lang_Math_acos.c + fl_LE_java_lang_Math_asin.c + fl_LE_java_lang_Math_atan.c + fl_LE_java_lang_Math_atan2.c + fl_LE_java_lang_Math_ceil_double.c + fl_LE_java_lang_Math_cos.c + fl_LE_java_lang_Math_exp.c + fl_LE_java_lang_Math_floor_double.c + fl_LE_java_lang_Math_IEEEremainder_double.c + fl_LE_java_lang_Math_log.c + fl_LE_java_lang_Math_max_double_double.c + fl_LE_java_lang_Math_max_float_float.c + fl_LE_java_lang_Math_min_double_double.c + fl_LE_java_lang_Math_min_float_float.c + fl_LE_java_lang_Math_pow.c + fl_LE_java_lang_Math_rint_double.c + fl_LE_java_lang_Math_round_double.c + fl_LE_java_lang_Math_round_float.c + fl_LE_java_lang_Math_sin.c + fl_LE_java_lang_Math_sqrt_double.c + fl_LE_java_lang_Math_tan.c + fl_LE_java_lang_Math_toDegrees_double.c + fl_LE_java_lang_Math_toRadians_double.c + fl_LE_java_lang_StrictMath_acos.c + fl_LE_java_lang_StrictMath_asin.c + fl_LE_java_lang_StrictMath_atan.c + fl_LE_java_lang_StrictMath_atan2.c + fl_LE_java_lang_StrictMath_cos.c + fl_LE_java_lang_StrictMath_exp.c + fl_LE_java_lang_StrictMath_log.c + fl_LE_java_lang_StrictMath_pow.c + fl_LE_java_lang_StrictMath_sin.c + fl_LE_java_lang_StrictMath_tan.c + fl_LE_JBd2f.c + fl_LE_JBd2i.c + fl_LE_JBd2l.c + fl_LE_JBdadd.c + fl_LE_JBdcmpg.c + fl_LE_JBdcmpl.c + fl_LE_JBddiv.c + fl_LE_JBdmul.c + fl_LE_JBdneg.c + fl_LE_JBdrem.c + fl_LE_JBdsub.c + fl_LE_JBf2d.c + fl_LE_JBf2i.c + fl_LE_JBf2l.c + fl_LE_JBfadd.c + fl_LE_JBfcmpg.c + fl_LE_JBfcmpl.c + fl_LE_JBfdiv.c + fl_LE_JBfmul.c + fl_LE_JBfneg.c + fl_LE_JBfrem.c + fl_LE_JBfsub.c + fl_LE_JBi2d.c + fl_LE_JBi2f.c + fl_LE_JBl2d.c + fl_LE_JBl2f.c + floatsanitygLibrary.c +) +target_link_libraries(floatsanityg + PRIVATE + j9vm_interface + j9fdm + #j9fdmlib + j9util + j9utilcore + j9avl + j9hashtable + j9thr + +) +install( + TARGETS floatsanityg + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/gc/CMakeLists.txt b/runtime/gc/CMakeLists.txt new file mode 100644 index 00000000000..f9d865efa02 --- /dev/null +++ b/runtime/gc/CMakeLists.txt @@ -0,0 +1,92 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gc SHARED + dllinit.c + gctable.c + +) + +if(OMR_TOOLCONFIG STREQUAL "gnu") + if(OMR_ARCH_X86) + target_compile_options(j9gc PRIVATE -fpeel-loops) + endif() +elseif(OMR_TOOLCONFIG STREQUAL "msvc") + target_compile_options(j9gc PRIVATE /w34189) +endif() + +target_link_libraries(j9gc + PRIVATE + j9vm_interface + + j9util + j9utilcore + j9avl + j9thr + j9stackmap + j9pool + omrgc #LINKING HACK + j9hookable + j9gcbase + #omrgcbase + j9gcstructs + #omrgcstructs + j9gcstats + #omrgcstats + j9gcapi + j9modronstartup + #omrgcstartup + j9gctrc + j9gctrcstandard + j9gctrcvlhgc + # j9modronstandard + #omrgcstandard + j9staccato + j9realtime + #wimm.lib + j9gcvlhgc + #j9gcddr + + omrgc + + #TODO: this is hack to make linking work + j9modronstandard + j9gcbase + j9hashtable + j9gcbase + j9modronstandard + j9realtime + j9gcvlhgc + j9gcbase + + j9thr + #TODO need to do based on platform + pthread + rt +) +#more link hacks +set_target_properties(j9gc PROPERTIES LINK_INTERFACE_MULTIPLICITY 5) + +install( + TARGETS j9gc + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/gc_api/CMakeLists.txt b/runtime/gc_api/CMakeLists.txt new file mode 100644 index 00000000000..37ba9a952eb --- /dev/null +++ b/runtime/gc_api/CMakeLists.txt @@ -0,0 +1,43 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcapi STATIC + GuaranteedNurseryRange.cpp + HeapIteratorAPI.cpp + HeapIteratorAPIBufferedIterator.cpp + HeapIteratorAPIRootIterator.cpp + HeapRootScanner.cpp +) +target_include_directories(j9gcapi + PRIVATE + . + ../gc_base + ../gc_stats + ../gc_structs +) + +target_link_libraries(j9gcapi + PRIVATE + j9vm_interface + j9vm_gc_includes + omrgc +) diff --git a/runtime/gc_base/CMakeLists.txt b/runtime/gc_base/CMakeLists.txt new file mode 100644 index 00000000000..7bc0c84b4d1 --- /dev/null +++ b/runtime/gc_base/CMakeLists.txt @@ -0,0 +1,72 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcbase STATIC + accessBarrier.cpp + AsyncCallbackHandler.cpp + ClassLoaderLinkedListIterator.cpp + ClassLoaderManager.cpp + FinalizeListManager.cpp + FinalizerSupport.cpp + GCExtensions.cpp + GCObjectEvents.cpp + GenerationalAccessBarrierComponent.cpp + IdleGCManager.cpp + IndexableObjectAllocationModel.cpp + modronapi.cpp + ObjectAccessBarrier.cpp + ObjectCheck.cpp + OwnableSynchronizerObjectBuffer.cpp + OwnableSynchronizerObjectList.cpp + PacketSlotIterator.cpp + QueryGCStatus.cpp + ReferenceChainWalker.cpp + ReferenceObjectBuffer.cpp + ReferenceObjectList.cpp + RootScanner.cpp + ScavengerForwardedHeader.cpp + StackSlotValidator.cpp + StringTable.cpp + UnfinalizedObjectBuffer.cpp + UnfinalizedObjectList.cpp + VMInterface.cpp + VMInterfaceAPI.cpp + VMThreadInterface.cpp + Wildcard.cpp + WorkPacketsIterator.cpp +) + +target_link_libraries(j9gcbase + PRIVATE + j9vm_interface + j9vm_gc_includes + omrgc + #j9util +) + +target_include_directories(j9gcbase + PRIVATE + ../gc_stats + ../gc_structs + ../gc_vlhgc + . +) diff --git a/runtime/gc_check/CMakeLists.txt b/runtime/gc_check/CMakeLists.txt new file mode 100644 index 00000000000..e3c85ef8223 --- /dev/null +++ b/runtime/gc_check/CMakeLists.txt @@ -0,0 +1,64 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gccheck STATIC + Check.cpp + CheckClassHeap.cpp + CheckClassLoaders.cpp + CheckCycle.cpp + CheckEngine.cpp + CheckError.cpp + CheckFinalizableList.cpp + CheckJNIGlobalReferences.cpp + CheckJNIWeakGlobalReferences.cpp + CheckJVMTIObjectTagTables.cpp + CheckMonitorTable.cpp + CheckObjectHeap.cpp + CheckOwnableSynchronizerList.cpp + CheckRememberedSet.cpp + CheckReporter.cpp + CheckReporterTTY.cpp + CheckStringTable.cpp + CheckUnfinalizedList.cpp + CheckVMClassSlots.cpp + CheckVMThreads.cpp + CheckVMThreadStacks.cpp + FixDeadObjects.cpp + ScanFormatter.cpp +) +target_include_directories(j9gccheck + PRIVATE + ../oti + ../include + ../omr/include_core + + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) + +target_link_libraries(j9gccheck + PRIVATE + omrgc + j9gcbase + j9gcstructs + j9gcstats +) diff --git a/runtime/gc_glue_java/CMakeLists.txt b/runtime/gc_glue_java/CMakeLists.txt new file mode 100644 index 00000000000..366afd43dc9 --- /dev/null +++ b/runtime/gc_glue_java/CMakeLists.txt @@ -0,0 +1,88 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9vm_gc_glue INTERFACE) +target_sources(j9vm_gc_glue + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/ArrayletObjectModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ArrayletObjectModelBase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CollectorLanguageInterfaceImpl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CompactSchemeFixupObject.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CompactSchemeFixupRoots.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ConcurrentSafepointCallbackJava.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/EnvironmentDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/GlobalCollectorDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/JNICriticalRegion.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MarkingDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MarkingSchemeRootClearer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MarkingSchemeRootMarker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MixedObjectModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ObjectModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ObjectModelDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerBackOutScanner.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerRootClearer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerRootScanner.cpp +) +target_link_libraries(j9vm_gc_glue + INTERFACE + j9vm_interface + j9vm_gc_includes +) +target_include_directories(j9vm_gc_glue + INTERFACE + ../gc_base + ../gc_stats + ../gc_structs + ../gc_modron_standard + ../gc_staccato + ../gc_realtime + ../gc_trace + ../gc_vlhgc +) +add_library(j9vm_util_glue INTERFACE) +target_sources(j9vm_util_glue + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/UtilGlue.c +) +target_link_libraries(j9vm_util_glue + INTERFACE + j9vm_interface + j9vm_nls +) + + +add_library(j9vm_ras_glue INTERFACE) +target_sources(j9vm_ras_glue + INTERFACE +) + +add_library(j9vm_core_glue INTERFACE) +target_sources(j9vm_core_glue + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/LanguageVMGlue.c +) +target_link_libraries(j9vm_core_glue + INTERFACE + j9vm_gc_includes +) + +add_library(j9vm_vm_glue INTERFACE) diff --git a/runtime/gc_modron_standard/CMakeLists.txt b/runtime/gc_modron_standard/CMakeLists.txt new file mode 100644 index 00000000000..1037636e8ca --- /dev/null +++ b/runtime/gc_modron_standard/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9modronstandard STATIC + ConcurrentSweepGC.cpp + OwnableSynchronizerObjectBufferStandard.cpp + ReferenceObjectBufferStandard.cpp + StandardAccessBarrier.cpp + UnfinalizedObjectBufferStandard.cpp +) +target_include_directories(j9modronstandard + PRIVATE + ../gc_stats + ../gc_base + ../gc_glue_java + ../gc_structs +) +target_link_libraries(j9modronstandard + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc + j9gcbase +) diff --git a/runtime/gc_modron_startup/CMakeLists.txt b/runtime/gc_modron_startup/CMakeLists.txt new file mode 100644 index 00000000000..18fa358f4b3 --- /dev/null +++ b/runtime/gc_modron_startup/CMakeLists.txt @@ -0,0 +1,49 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9modronstartup STATIC + arrayCopy.cpp + gcmspace.cpp + GCVerboseInterface.cpp + mgcalloc.cpp + mmhelpers.cpp + mminit.cpp + mmparse.cpp + mmparseXgc.cpp + mmparseXgcpolicy.cpp + mmparseXXgc.cpp +) + +target_include_directories(j9modronstartup + PUBLIC + . +) +target_link_libraries(j9modronstartup + PRIVATE + j9vm_interface + j9vm_nls + + omrgc + j9gcstats + j9gcbase + j9utilcore +) diff --git a/runtime/gc_realtime/CMakeLists.txt b/runtime/gc_realtime/CMakeLists.txt new file mode 100644 index 00000000000..2ab0591f7e8 --- /dev/null +++ b/runtime/gc_realtime/CMakeLists.txt @@ -0,0 +1,63 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9realtime STATIC + AllocationContextRealtime.cpp + BarrierSynchronization.cpp + ConfigurationRealtime.cpp + EnvironmentRealtime.cpp + GlobalAllocationManagerRealtime.cpp + HeapRegionDescriptorRealtime.cpp + IncrementalOverflow.cpp + IncrementalParallelTask.cpp + MemorySubSpaceMetronome.cpp + MetronomeAlarm.cpp + MetronomeAlarmThread.cpp + OSInterface.cpp + OwnableSynchronizerObjectBufferRealtime.cpp + ProcessorInfo.cpp + RealtimeAccessBarrier.cpp + RealtimeGC.cpp + RealtimeMarkingScheme.cpp + RealtimeMarkTask.cpp + RealtimeRootScanner.cpp + RealtimeSweepTask.cpp + ReferenceObjectBufferRealtime.cpp + RememberedSetWorkPackets.cpp + Scheduler.cpp + SweepSchemeRealtime.cpp + Timer.cpp + UnfinalizedObjectBufferRealtime.cpp + UtilizationTracker.cpp + WorkPacketsRealtime.cpp + YieldCollaborator.cpp + +) + +target_link_libraries(j9realtime + PRIVATE + j9vm_interface + j9vm_nls + + omrgc + j9gcbase +) diff --git a/runtime/gc_staccato/CMakeLists.txt b/runtime/gc_staccato/CMakeLists.txt new file mode 100644 index 00000000000..5a7669435b2 --- /dev/null +++ b/runtime/gc_staccato/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9staccato STATIC + ConfigurationStaccato.cpp + EnvironmentStaccato.cpp + StaccatoAccessBarrier.cpp + StaccatoGC.cpp + +) + +target_include_directories(j9staccato + PRIVATE + ../omr/include_core + ../gc_realtime +) + +target_link_libraries(j9staccato + PRIVATE + j9vm_interface + omrgc +) diff --git a/runtime/gc_stats/CMakeLists.txt b/runtime/gc_stats/CMakeLists.txt new file mode 100644 index 00000000000..bf1ff133638 --- /dev/null +++ b/runtime/gc_stats/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcstats STATIC + CopyForwardStats.cpp + FrequentObjectsStats.cpp + MarkJavaStats.cpp + ScavengerJavaStats.cpp +) + +target_include_directories(j9gcstats PUBLIC .) + +target_link_libraries(j9gcstats + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc + j9gcbase + j9utilcore +) diff --git a/runtime/gc_structs/CMakeLists.txt b/runtime/gc_structs/CMakeLists.txt new file mode 100644 index 00000000000..a404365986d --- /dev/null +++ b/runtime/gc_structs/CMakeLists.txt @@ -0,0 +1,61 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcstructs STATIC + ArrayletLeafIterator.cpp + CallSitesIterator.cpp + ClassArrayClassSlotIterator.cpp + ClassHeapIterator.cpp + ClassIterator.cpp + ClassIteratorClassSlots.cpp + ClassIteratorDeclarationOrder.cpp + ClassLoaderClassesIterator.cpp + ClassLoaderSegmentIterator.cpp + ClassLocalInterfaceIterator.cpp + ClassStaticsDeclarationOrderIterator.cpp + ClassStaticsIterator.cpp + ClassSuperclassesIterator.cpp + ConstantPoolClassSlotIterator.cpp + ConstantPoolObjectSlotIterator.cpp + JVMTIObjectTagTableIterator.cpp + MethodTypesIterator.cpp + MixedObjectDeclarationOrderIterator.cpp + MixedObjectIterator.cpp + PointerArrayIterator.cpp + SegmentIterator.cpp + StringTableIncrementalIterator.cpp + VMClassSlotIterator.cpp + VMThreadIterator.cpp + VMThreadJNISlotIterator.cpp + VMThreadListIterator.cpp + VMThreadMonitorRecordSlotIterator.cpp + VMThreadSlotIterator.cpp + VMThreadStackSlotIterator.cpp +) + +target_link_libraries(j9gcstructs + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc +) diff --git a/runtime/gc_tests/CMakeLists.txt b/runtime/gc_tests/CMakeLists.txt new file mode 100644 index 00000000000..64912aed5b9 --- /dev/null +++ b/runtime/gc_tests/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# We dont want to suffix vm version to shared libs +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_subdirectory(hooktests) +add_subdirectory(rwlocktests) diff --git a/runtime/gc_tests/hooktests/CMakeLists.txt b/runtime/gc_tests/hooktests/CMakeLists.txt new file mode 100644 index 00000000000..6e091598b65 --- /dev/null +++ b/runtime/gc_tests/hooktests/CMakeLists.txt @@ -0,0 +1,36 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(hooktests SHARED + gc_hooktests.c +) + +target_link_libraries(hooktests + PRIVATE + j9vm_interface + j9vm_gc_includes +) + +install( + TARGETS hooktests + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/gc_tests/rwlocktests/CMakeLists.txt b/runtime/gc_tests/rwlocktests/CMakeLists.txt new file mode 100644 index 00000000000..1248d8fb6ef --- /dev/null +++ b/runtime/gc_tests/rwlocktests/CMakeLists.txt @@ -0,0 +1,50 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(gc_rwlocktest + gc_rwlocktest.cpp + main.cpp +) + +target_link_libraries(gc_rwlocktest + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_main_wrapper + + thread_cutest_harness + j9prt + j9util + j9utilcore + j9thr + j9exelib + j9avl + j9hashtable + j9pool + j9gcbase + omrgc +) + +install( + TARGETS gc_rwlocktest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/gc_trace/CMakeLists.txt b/runtime/gc_trace/CMakeLists.txt new file mode 100644 index 00000000000..f2a01ba3326 --- /dev/null +++ b/runtime/gc_trace/CMakeLists.txt @@ -0,0 +1,57 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gctrc STATIC + Tgc.cpp + TgcAllocation.cpp + TgcAllocationContext.cpp + TgcBacktrace.cpp + TgcCardCleaning.cpp + TgcConcurrent.cpp + TgcConcurrentcardcleaning.cpp + TgcCopyForward.cpp + TgcDump.cpp + TgcExcessivegc.cpp + TgcExclusiveaccess.cpp + TgcExtensions.cpp + TgcFreelist.cpp + TgcHeap.cpp + TgcNuma.cpp + TgcParallel.cpp + TgcRootScanner.cpp + TgcScavenger.cpp + TgcTerse.cpp +) + +target_include_directories(j9gctrc + PRIVATE + ../gc_include + ../omr/include_core + ../gc_trace_standard + ../gc_trace_vlhgc +) + +target_link_libraries(j9gctrc + PRIVATE + omrgc +) + diff --git a/runtime/gc_trace_standard/CMakeLists.txt b/runtime/gc_trace_standard/CMakeLists.txt new file mode 100644 index 00000000000..07876e733f7 --- /dev/null +++ b/runtime/gc_trace_standard/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gctrcstandard STATIC + TgcCompaction.cpp + TgcFreeListSummary.cpp + TgcLargeAllocation.cpp +) + +target_include_directories(j9gctrcstandard + PRIVATE + ../gc_include + ../omr/include_core +) + +target_link_libraries(j9gctrcstandard + PRIVATE + omrgc +) + diff --git a/runtime/gc_trace_vlhgc/CMakeLists.txt b/runtime/gc_trace_vlhgc/CMakeLists.txt new file mode 100644 index 00000000000..573c83e9919 --- /dev/null +++ b/runtime/gc_trace_vlhgc/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gctrcvlhgc STATIC + TgcDynamicCollectionSet.cpp + TgcIntelligentCompact.cpp + TgcInterRegionReferences.cpp + TgcInterRegionRememberedSet.cpp + TgcInterRegionRememberedSetDemographics.cpp + TgcProjectedStats.cpp + TgcWriteOnceCompaction.cpp + TgcWriteOnceCompactTiming.cpp +) + +target_include_directories(j9gctrcvlhgc + PRIVATE + ../gc_include + ../omr/include_core +) + +target_link_libraries(j9gctrcvlhgc + PRIVATE + omrgc +) + diff --git a/runtime/gc_verbose_handler_realtime/CMakeLists.txt b/runtime/gc_verbose_handler_realtime/CMakeLists.txt new file mode 100644 index 00000000000..6fedeb4f70e --- /dev/null +++ b/runtime/gc_verbose_handler_realtime/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcvrbhdlrrealtime STATIC + VerboseHandlerOutputRealtime.cpp + VerboseHandlerRealtime.cpp +) +target_include_directories(j9gcvrbhdlrrealtime + PRIVATE + ../gc_include + ../gc_verbose_java + ../omr/include_core +) +target_link_libraries(j9gcvrbhdlrrealtime omrgc) diff --git a/runtime/gc_verbose_handler_standard_java/CMakeLists.txt b/runtime/gc_verbose_handler_standard_java/CMakeLists.txt new file mode 100644 index 00000000000..2d18b66a8be --- /dev/null +++ b/runtime/gc_verbose_handler_standard_java/CMakeLists.txt @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcvrbhdlrstandardjava STATIC + VerboseHandlerOutputStandardJava.cpp +) + +target_include_directories(j9gcvrbhdlrstandardjava + PRIVATE + ../gc_include + ../gc_verbose_java + ../omr/include_core +) +target_link_libraries(j9gcvrbhdlrstandardjava + PRIVATE + omrgc + j9gcvrbjava +) diff --git a/runtime/gc_verbose_handler_vlhgc/CMakeLists.txt b/runtime/gc_verbose_handler_vlhgc/CMakeLists.txt new file mode 100644 index 00000000000..5e521158f80 --- /dev/null +++ b/runtime/gc_verbose_handler_vlhgc/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcvrbhdlrvlhgc STATIC + VerboseHandlerOutputVLHGC.cpp + VerboseHandlerPlaceholder_vlhgc.cpp +) +target_include_directories(j9gcvrbhdlrvlhgc + PRIVATE + ../gc_include + ../gc_verbose_java + ../gc_vlhgc +) +target_link_libraries(j9gcvrbhdlrvlhgc + PRIVATE + j9vm_interface + j9vm_gc_includes + + + omrgc + j9gcbase +) diff --git a/runtime/gc_verbose_java/CMakeLists.txt b/runtime/gc_verbose_java/CMakeLists.txt new file mode 100644 index 00000000000..3ed4c9f8d88 --- /dev/null +++ b/runtime/gc_verbose_java/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcvrbjava STATIC + VerboseHandlerJava.cpp + VerboseJava.cpp + VerboseManagerJava.cpp + VerboseWriterTrace.cpp + +) +target_include_directories(j9gcvrbjava + PRIVATE + ../gc_verbose_handler_standard_java + ../gc_verbose_handler_realtime + ../gc_verbose_handler_vlhgc + ../gc_verbose_old +) +target_link_libraries(j9gcvrbjava + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc + j9utilcore +) diff --git a/runtime/gc_verbose_old/CMakeLists.txt b/runtime/gc_verbose_old/CMakeLists.txt new file mode 100644 index 00000000000..e4bace5bd5b --- /dev/null +++ b/runtime/gc_verbose_old/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcvrbold STATIC + VerboseEventStream.cpp + VerboseFileLoggingOutput.cpp + VerboseManagerOld.cpp + VerboseOutputAgent.cpp + VerboseStandardStreamOutput.cpp + VerboseTraceOutput.cpp +) +target_include_directories(j9gcvrbold + PRIVATE + ../gc_verbose_old_events +) +target_link_libraries(j9gcvrbold + PRIVATE + j9vm_interface + j9vm_nls + + omrgc +) diff --git a/runtime/gc_verbose_old_events/CMakeLists.txt b/runtime/gc_verbose_old_events/CMakeLists.txt new file mode 100644 index 00000000000..be09576f9a7 --- /dev/null +++ b/runtime/gc_verbose_old_events/CMakeLists.txt @@ -0,0 +1,88 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcvrbevents STATIC + VerboseEvent.cpp + VerboseEventAFEnd.cpp + VerboseEventClassUnloadingEnd.cpp + VerboseEventClassUnloadingStart.cpp + VerboseEventCompactEnd.cpp + VerboseEventCompactStart.cpp + VerboseEventCompletedConcurrentSweep.cpp + VerboseEventConcurrentAborted.cpp + VerboseEventConcurrentCompleteTracingEnd.cpp + VerboseEventConcurrentCompleteTracingStart.cpp + VerboseEventConcurrentEnd.cpp + VerboseEventConcurrentFinalCardCleaningEnd.cpp + VerboseEventConcurrentFinalCardCleaningStart.cpp + VerboseEventConcurrentHalted.cpp + VerboseEventConcurrentKickOff.cpp + VerboseEventConcurrentlyCompletedSweepPhase.cpp + VerboseEventConcurrentRSScanEnd.cpp + VerboseEventConcurrentRSScanStart.cpp + VerboseEventConcurrentStart.cpp + VerboseEventCopyForwardAbortRaised.cpp + VerboseEvent.cpp + VerboseEventAFStart.cpp + VerboseEventExcessiveGCRaised.cpp + VerboseEventGCEnd.cpp + VerboseEventGCInitialized.cpp + VerboseEventGCStart.cpp + VerboseEventGlobalGCEnd.cpp + VerboseEventGlobalGCStart.cpp + VerboseEventHeapResize.cpp + VerboseEventLocalGCEnd.cpp + VerboseEventLocalGCStart.cpp + VerboseEventMarkEnd.cpp + VerboseEventMarkStart.cpp + VerboseEventMetronomeCycleEnd.cpp + VerboseEventMetronomeCycleStart.cpp + VerboseEventMetronomeGCEnd.cpp + VerboseEventMetronomeGCStart.cpp + VerboseEventMetronomeNonMonotonicTime.cpp + VerboseEventMetronomeOutOfMemory.cpp + VerboseEventMetronomeSynchronousGCEnd.cpp + VerboseEventMetronomeSynchronousGCStart.cpp + VerboseEventMetronomeTriggerEnd.cpp + VerboseEventMetronomeTriggerStart.cpp + VerboseEventMetronomeUtilizationTrackerOverflow.cpp + VerboseEventPercolateCollect.cpp + VerboseEventReportMemoryUsage.cpp + VerboseEventSweepEnd.cpp + VerboseEventSweepStart.cpp + VerboseEventSystemGCEnd.cpp + VerboseEventSystemGCStart.cpp + VerboseEventTarokIncrementEnd.cpp + VerboseEventTarokIncrementStart.cpp +) + +target_include_directories(j9gcvrbevents + PRIVATE + ../gc_verbose_old +) +target_link_libraries(j9gcvrbevents + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc +) diff --git a/runtime/gc_vlhgc/CMakeLists.txt b/runtime/gc_vlhgc/CMakeLists.txt new file mode 100644 index 00000000000..91b302cd844 --- /dev/null +++ b/runtime/gc_vlhgc/CMakeLists.txt @@ -0,0 +1,98 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcvlhgc STATIC + AllocationContextBalanced.cpp + AllocationContextTarok.cpp + CardListFlushTask.cpp + ClassLoaderRememberedSet.cpp + CollectionSetDelegate.cpp + CompactGroupManager.cpp + CompactGroupPersistentStats.cpp + CompressedCardTable.cpp + ConfigurationIncrementalGenerational.cpp + CopyForwardDelegate.cpp + CopyForwardGMPCardCleaner.cpp + CopyForwardNoGMPCardCleaner.cpp + CopyForwardScheme.cpp + CopyScanCacheChunkVLHGC.cpp + CopyScanCacheChunkVLHGCInHeap.cpp + CopyScanCacheListVLHGC.cpp + CopyScanCacheVLHGC.cpp + CycleStateVLHGC.cpp + EnvironmentVLHGC.cpp + GlobalAllocationManagerTarok.cpp + GlobalCollectionCardCleaner.cpp + GlobalCollectionNoScanCardCleaner.cpp + GlobalMarkCardCleaner.cpp + GlobalMarkCardScrubber.cpp + GlobalMarkDelegate.cpp + GlobalMarkingScheme.cpp + GlobalMarkNoScanCardCleaner.cpp + HeapRegionDataForAllocate.cpp + HeapRegionDataForCompactVLHGC.cpp + HeapRegionDescriptorVLHGC.cpp + HeapRegionManagerVLHGC.cpp + IncrementalCardTable.cpp + IncrementalGenerationalGC.cpp + InterRegionRememberedSet.cpp + MarkMapManager.cpp + MemorySubSpaceTarok.cpp + OwnableSynchronizerObjectBufferVLHGC.cpp + ParallelSweepSchemeVLHGC.cpp + PartialMarkDelegate.cpp + PartialMarkGMPCardCleaner.cpp + PartialMarkingScheme.cpp + PartialMarkNoGMPCardCleaner.cpp + ProjectedSurvivalCollectionSetDelegate.cpp + ReclaimDelegate.cpp + ReferenceObjectBufferVLHGC.cpp + RegionBasedOverflowVLHGC.cpp + RegionListTarok.cpp + RegionValidator.cpp + RememberedSetCardBucket.cpp + RememberedSetCardListBufferIterator.cpp + RememberedSetCardListCardIterator.cpp + RememberedSetCardList.cpp + RuntimeExecManager.cpp + SchedulingDelegate.cpp + SweepHeapSectioningVLHGC.cpp + SweepPoolManagerVLHGC.cpp + UnfinalizedObjectBufferVLHGC.cpp + VLHGCAccessBarrier.cpp + WorkPacketsVLHGC.cpp + WriteOnceCompactor.cpp + WriteOnceFixupCardCleaner.cpp + +) +target_include_directories(j9gcvlhgc + PRIVATE + ../gc_include +) +target_link_libraries(j9gcvlhgc + PRIVATE + j9vm_interface + + omrgc + j9gcstructs + j9gcbase +) diff --git a/runtime/gcchk/CMakeLists.txt b/runtime/gcchk/CMakeLists.txt new file mode 100644 index 00000000000..a1e469eafe3 --- /dev/null +++ b/runtime/gcchk/CMakeLists.txt @@ -0,0 +1,49 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9gcchk SHARED + gcchk.cpp +) + +target_link_libraries(j9gcchk + PRIVATE + j9vm_interface + j9util + j9utilcore + j9avl + j9hashtable + j9thr + j9stackmap + j9pool + j9hookable + + #TODO do we just want to link agains j9gc? + j9gcbase + j9gcstructs + j9gcstats + j9gccheck + omrgc +) +install( + TARGETS j9gcchk + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/gdb_plugin/CMakeLists.txt b/runtime/gdb_plugin/CMakeLists.txt new file mode 100644 index 00000000000..183329d974d --- /dev/null +++ b/runtime/gdb_plugin/CMakeLists.txt @@ -0,0 +1,54 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(gdb_j9 SHARED + gdb_plugin_glue.c + gdb_plugin.c +) + +target_compile_definitions(gdb_j9 + PRIVATE + J9VM_INTERP_STACKWALK_TRACING + J9VM_OUT_OF_PROCESS +) +target_link_libraries(gdb_j9 + PRIVATE + j9vm_interface + j9vm_compiler_defines + + j9dbgext + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9prt + j9thr + #j9gcbasedbgext + #j9gcchkdbgext + #j9gcapidbgext +) + +install( + TARGETS gdb_j9 + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/harmony/CMakeLists.txt b/runtime/harmony/CMakeLists.txt new file mode 100644 index 00000000000..ff5a3f69d3b --- /dev/null +++ b/runtime/harmony/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +include_directories(include) + +add_subdirectory(stubs) +add_subdirectory(thread) + +# Dont append release version +set_target_properties(hythr hyprt PROPERTIES SUFFIX "${J9VM_OLD_SHARED_SUFFIX}") diff --git a/runtime/harmony/stubs/CMakeLists.txt b/runtime/harmony/stubs/CMakeLists.txt new file mode 100644 index 00000000000..e024f97bc96 --- /dev/null +++ b/runtime/harmony/stubs/CMakeLists.txt @@ -0,0 +1,45 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(hyprt SHARED + hyport_stub.c +) +target_link_libraries(hyprt + PRIVATE + j9vm_interface +) + +add_library(hyprtshim SHARED + hyport_shim.c +) + +target_link_libraries(hyprtshim + PRIVATE + j9vm_interface + hythr + j9thr +) + +install( + TARGETS hyprtshim + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/harmony/thread/CMakeLists.txt b/runtime/harmony/thread/CMakeLists.txt new file mode 100644 index 00000000000..4b26e7758ca --- /dev/null +++ b/runtime/harmony/thread/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(hythr SHARED + hythread.c +) + +target_link_libraries(hythr + PRIVATE + j9vm_interface + j9thr +) +target_compile_definitions(hythr + PRIVATE + -DHYTHREAD_LIBRARY_DEFINE +) + +install( + TARGETS hythr + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/hyvm/CMakeLists.txt b/runtime/hyvm/CMakeLists.txt new file mode 100644 index 00000000000..16b7d587864 --- /dev/null +++ b/runtime/hyvm/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Dont append version suffix +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_library(harmony_jvm SHARED + harmony_vm.c +) + +target_properties(hyarmony_jvm PROPERTIES NAME "jvm") diff --git a/runtime/j9vm/CMakeLists.txt b/runtime/j9vm/CMakeLists.txt new file mode 100644 index 00000000000..43995f95909 --- /dev/null +++ b/runtime/j9vm/CMakeLists.txt @@ -0,0 +1,80 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# We dont want to suffix vm version to shared libs +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_tracegen(j9scar.tdf) + +add_library(jvm_common INTERFACE) +target_sources(jvm_common INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/j7verify.c + ${CMAKE_CURRENT_SOURCE_DIR}/j7vmi.c + ${CMAKE_CURRENT_SOURCE_DIR}/j8vmi.c + ${CMAKE_CURRENT_SOURCE_DIR}/j9memcategories.c + ${CMAKE_CURRENT_SOURCE_DIR}/java9vmi.c + ${CMAKE_CURRENT_SOURCE_DIR}/jvm.c + ${CMAKE_CURRENT_SOURCE_DIR}/vmi.c + #TODO this is gross + ${CMAKE_CURRENT_SOURCE_DIR}/../hyvm/harmony_vm.c +) + +target_link_libraries(jvm_common + INTERFACE + j9vm_interface + j9vm_gc_includes + + j9exelib + j9utilcore + j9avl + j9hashtable + j9pool + j9vmi + pthread + dl +) + +target_include_directories(jvm_common + INTERFACE + #TODO we have to repeat ../include because of duplication of vmi.h + ../include + ../hyvm + ../harmony/include + ../jcl/ +) + +add_library(jvm SHARED ut_j9scar.c) +target_link_libraries(jvm + PRIVATE + jvm_common + j9util +) +add_dependencies(jvm omrgc_hookgen) +target_compile_definitions(jvm + PRIVATE + -DJ9VM_JAVA9_BUILD=148 +) + +install( + TARGETS jvm + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/j9vm_b150/CMakeLists.txt b/runtime/j9vm_b150/CMakeLists.txt new file mode 100644 index 00000000000..d45cc876d6e --- /dev/null +++ b/runtime/j9vm_b150/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(jvm_b150 SHARED ut_j9scar.c) +target_link_libraries(jvm_b150 + PRIVATE + jvm_common + j9util +) +add_dependencies(jvm_b150 omrgc_hookgen) +target_compile_definitions(jvm_b150 + PRIVATE + -DJ9VM_JAVA9_BUILD=150 +) + +set_target_properties(jvm_b150 PROPERTIES LIBRARY_OUTPUT_NAME jvm) + +install( + TARGETS jvm_b150 + LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/runtime/j9vm_b156/CMakeLists.txt b/runtime/j9vm_b156/CMakeLists.txt new file mode 100644 index 00000000000..1991f02bed7 --- /dev/null +++ b/runtime/j9vm_b156/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +#not needed atm, since uma is still generating things in tree +#TODO not ideal, but cmake doesnt like sources generated in a different directory +#add_tracegen(../j9vm/j9scar.tdf) + +add_library(jvm_b156 SHARED ut_j9scar.c) +target_include_directories(jvm_b156 PRIVATE ${j9vm_SOURCE_DIR}/j9vm) +target_link_libraries(jvm_b156 + PRIVATE + jvm_common + j9util_b156 +) +add_dependencies(jvm_b156 omrgc_hookgen) +target_compile_definitions(jvm_b156 + PRIVATE + -DJ9VM_JAVA9_BUILD=156 +) +set_target_properties(jvm_b156 PROPERTIES LIBRARY_OUTPUT_NAME jvm) + +install( + TARGETS jvm_b156 + LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/runtime/jcl/CMakeLists.txt b/runtime/jcl/CMakeLists.txt new file mode 100644 index 00000000000..cfe7f143108 --- /dev/null +++ b/runtime/jcl/CMakeLists.txt @@ -0,0 +1,178 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_subdirectory(cl_se7_basic) +add_subdirectory(cl_se9) +add_subdirectory(cl_se9_before_b165) + +add_library(j9vm_jcl_includes INTERFACE) +#TODO this is platform specific +target_include_directories(j9vm_jcl_includes + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/unix + ${j9vm_SOURCE_DIR}/shared_common/include +) + +add_library(j9vm_jcl_se6_vm-side_lifecycle INTERFACE) +target_sources(j9vm_jcl_se6_vm-side_lifecycle + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/vm_scar.c +) + + +add_library(j9vm_jcl_se6_vm-side_natives INTERFACE) +target_sources(j9vm_jcl_se6_vm-side_natives + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_J9VMInternals.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_ref_Finalizer.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_ref_Reference.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/reflecthelp.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/acccont.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/annparser.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jniidcacheinit.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/bootstrp.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/bpinit.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/clsldr.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/compiler.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/dump.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/exhelp + ${CMAKE_CURRENT_SOURCE_DIR}/common/getstacktrace + ${CMAKE_CURRENT_SOURCE_DIR}/common/iohelp.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jclcinit.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jcldefine.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jclexception.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jclglob.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jclhookhelp.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jclreflect.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/jclvm.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/log.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtclassloading.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtcompilation.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtgc.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtinit.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtmemmgr.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtmemory.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtmempool.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtos.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtosext.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtruntime.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtthread.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/proxy.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/shared.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/sigquit.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/stdinit + ${CMAKE_CURRENT_SOURCE_DIR}/common/system.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/string.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/thread.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/jcltrace.c + #ut_j9jcl.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/vm_scar.c + ${CMAKE_CURRENT_SOURCE_DIR}/filesys/vmfilesys.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/vminternals.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/sun_reflect_ConstantPool.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_Class.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_Access.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/com_ibm_oti_vm_VM.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmthypervisor.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/mgmtprocessor.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/com_ibm_jvm_Stats.c + + #TODO platform specific stuff here + ${CMAKE_CURRENT_SOURCE_DIR}/unix/syshelp.c +) + +j9vm_optional_compile(j9vm_jcl_se6_vm-side_natives + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/unix/helpers.c +) + + +target_include_directories(j9vm_jcl_se6_vm-side_natives + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common + #TODO fix + ${CMAKE_CURRENT_SOURCE_DIR}/unix +) + +add_library(j9vm_jcl_jithelpers INTERFACE) +target_sources(j9vm_jcl_jithelpers + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/jithelpers.c + # + # + # + # + # + # +) + +j9vm_optional_compile(j9vm_jcl_jithelpers + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/crypto.c +) + +add_library(j9vm_jcl_sun_misc_Unsafe INTERFACE) +target_sources(j9vm_jcl_sun_misc_Unsafe + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/sun_misc_Unsafe.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/unsafe_mem.c +) + +add_library(j9vm_jcl_attach INTERFACE) +target_sources(j9vm_jcl_attach + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/attach.c +) + +add_library(j9vm_jcl_se7 INTERFACE) +target_sources(j9vm_jcl_se7 + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_Access.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_Class.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/common/sun_misc_Perf.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/sun_reflect_ConstantPool.c + #if spec.flags.opt_methodHandle + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_dyn_methodhandle.c + #if spec.flags.opt_methodHandle + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_dyn_methodtype.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/extendedosmbean.c +) + + +add_library(j9vm_jcl_rcm INTERFACE) +target_sources(j9vm_jcl_rcm + INTERFACE + #${CMAKE_CURRENT_SOURCE_DIR}/common/rcmnatives.c +) + +add_library(j9vm_jcl_se8 INTERFACE) +target_sources(j9vm_jcl_se8 + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/gpu.c +) + +add_library(j9vm_jcl_se9 INTERFACE) +target_sources(j9vm_jcl_se9 + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_invoke_VarHandle.c + ${CMAKE_CURRENT_SOURCE_DIR}/common/java_lang_StackWalker.cpp +) diff --git a/runtime/jcl/cl_se7_basic/CMakeLists.txt b/runtime/jcl/cl_se7_basic/CMakeLists.txt new file mode 100644 index 00000000000..b876563eec4 --- /dev/null +++ b/runtime/jcl/cl_se7_basic/CMakeLists.txt @@ -0,0 +1,72 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(../j9jcl.tdf) + +add_library(jclse7b_ SHARED + ../j9vmconstantpool_se7_basic.c + ut_j9jcl.c +) +target_include_directories(jclse7b_ + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} + ../ +) + +target_compile_definitions(jclse7b_ + PRIVATE + J9VM_JCL_SE7_BASIC +) + +target_link_libraries(jclse7b_ + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_jcl_includes + omrsig + + j9vm_jcl_se6_vm-side_lifecycle + j9vm_jcl_se6_vm-side_natives + j9vm_jcl_jithelpers + j9vm_jcl_sun_misc_Unsafe + j9vm_jcl_attach + j9vm_jcl_se7 + j9vm_jcl_rcm + j9vm_jcl_se8 + #pthread + j9hookable + j9zlib + j9util + j9utilcore + j9avl + j9hashtable + j9pool + #j9fdlibm + j9thr + j9vmi + sunvmi +) + +install( + TARGETS jclse7b_ + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/jcl/cl_se9/CMakeLists.txt b/runtime/jcl/cl_se9/CMakeLists.txt new file mode 100644 index 00000000000..785e790c026 --- /dev/null +++ b/runtime/jcl/cl_se9/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(../j9jcl.tdf) +#TODO scope b165 +add_library(jclse9_156 SHARED + ../j9vmconstantpool_se9.c + ut_j9jcl.c +) +target_include_directories(jclse9_156 + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} + ../ +) + +target_compile_definitions(jclse9_156 + PRIVATE + J9VM_JCL_SE9 +) + +target_link_libraries(jclse9_156 + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_jcl_includes + omrsig + + j9vm_jcl_se6_vm-side_lifecycle + j9vm_jcl_se6_vm-side_natives + j9vm_jcl_jithelpers + j9vm_jcl_sun_misc_Unsafe + j9vm_jcl_attach + j9vm_jcl_se7 + j9vm_jcl_se8 + j9vm_jcl_se9 + #pthread + j9hookable + j9zlib + j9util + j9utilcore + j9avl + j9hashtable + j9pool + #j9fdlibm + j9thr + j9vmi + sunvmi +) +set_target_properties(jclse9_156 PROPERTIES LIBRARY_OUTPUT_NAME jclse9_) + +install( + TARGETS jclse9_156 + LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR} +) diff --git a/runtime/jcl/cl_se9_before_b165/CMakeLists.txt b/runtime/jcl/cl_se9_before_b165/CMakeLists.txt new file mode 100644 index 00000000000..a59b8578789 --- /dev/null +++ b/runtime/jcl/cl_se9_before_b165/CMakeLists.txt @@ -0,0 +1,72 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(../j9jcl.tdf) +#TODO scope b165 +add_library(jclse9_ SHARED + ../j9vmconstantpool_se9_before_b165.c + ut_j9jcl.c +) +target_include_directories(jclse9_ + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} + ../ +) + +target_compile_definitions(jclse9_ + PRIVATE + J9VM_JCL_SE9 +) + +target_link_libraries(jclse9_ + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_jcl_includes + omrsig + + j9vm_jcl_se6_vm-side_lifecycle + j9vm_jcl_se6_vm-side_natives + j9vm_jcl_jithelpers + j9vm_jcl_sun_misc_Unsafe + j9vm_jcl_attach + j9vm_jcl_se7 + j9vm_jcl_se8 + j9vm_jcl_se9 + #pthread + j9hookable + j9zlib + j9util + j9utilcore + j9avl + j9hashtable + j9pool + #j9fdlibm + j9thr + j9vmi + sunvmi +) + +install( + TARGETS jclse9_ + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/jextractnatives/CMakeLists.txt b/runtime/jextractnatives/CMakeLists.txt new file mode 100644 index 00000000000..b6b78435c2c --- /dev/null +++ b/runtime/jextractnatives/CMakeLists.txt @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9jextract SHARED + jextractglue.c + jextractnatives.c + +) + +target_link_libraries(j9jextract + PRIVATE + j9vm_interface + + j9dbgext + j9util + j9utilcore + j9pool +) + +install( + TARGETS j9jextract + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/jilgen/CMakeLists.txt b/runtime/jilgen/CMakeLists.txt new file mode 100644 index 00000000000..9d9518afcb3 --- /dev/null +++ b/runtime/jilgen/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(constgen + jilconsts.c +) + +target_link_libraries(constgen + PRIVATE + j9prt + j9thr +) + +add_custom_command( + OUTPUT ${j9vm_SOURCE_DIR}/oti/jilconsts.inc ${j9vm_SOURCE_DIR}/oti/jilvalues.m4 + COMMAND constgen + WORKING_DIRECTORY ${j9vm_SOURCE_DIR} +) +add_custom_target(run_constgen + DEPENDS ${j9vm_SOURCE_DIR}/oti/jilconsts.inc ${j9vm_SOURCE_DIR}/oti/jilvalues.m4 +) diff --git a/runtime/jit_vm/CMakeLists.txt b/runtime/jit_vm/CMakeLists.txt new file mode 100644 index 00000000000..fa9bdc1954a --- /dev/null +++ b/runtime/jit_vm/CMakeLists.txt @@ -0,0 +1,20 @@ + +add_library(j9jit_vm STATIC + artifact.c + cthelpers.cpp + ctsupport.c +) + +target_include_directories(j9jit_vm + PRIVATE + ${PROJECT_SOURCE_DIR}/oti + ${PROJECT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/gc_include + ${PROJECT_SOURCE_DIR}/omr/include_core + ${PROJECT_SOURCE_DIR}/codert_vm +) + +target_link_libraries(j9jit_vm + PRIVATE + j9vm_compiler_defines +) diff --git a/runtime/jnichk/CMakeLists.txt b/runtime/jnichk/CMakeLists.txt new file mode 100644 index 00000000000..53e94d7b896 --- /dev/null +++ b/runtime/jnichk/CMakeLists.txt @@ -0,0 +1,50 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9jni.tdf) + +add_library(j9jnichk SHARED + jnicbuf.c + jnicheck.c + jnicmem.c + jnicwrappers.c + + ut_j9jni.c +) + +target_link_libraries(j9jnichk + PRIVATE + j9vm_interface + + j9verutil + j9util + j9utilcore + j9avl + j9hashtable + j9thr + j9pool +) + +install( + TARGETS j9jnichk + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/jniinv/CMakeLists.txt b/runtime/jniinv/CMakeLists.txt new file mode 100644 index 00000000000..5687f0639da --- /dev/null +++ b/runtime/jniinv/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(invtest + main.c +) + +target_link_libraries(invtest + PRIVATE + j9vm_interface + j9vm_main_wrapper + + j9exelib + j9thr +) + +install( + TARGETS invtest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/jsigWrapper/CMakeLists.txt b/runtime/jsigWrapper/CMakeLists.txt new file mode 100644 index 00000000000..7599afdd84e --- /dev/null +++ b/runtime/jsigWrapper/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# We dont want to suffix vm version to shared libs +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_library(jsig SHARED + jsig.c +) + +target_link_libraries(jsig + PRIVATE + omrutil + dl +) + +install( + TARGETS jsig + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/jvmti/CMakeLists.txt b/runtime/jvmti/CMakeLists.txt new file mode 100644 index 00000000000..83d479e2081 --- /dev/null +++ b/runtime/jvmti/CMakeLists.txt @@ -0,0 +1,78 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9jvmti.tdf) + +add_library(j9jvmti SHARED + jvmtiBreakpoint.c + jvmtiCapability.c + jvmtiClass.c + jvmtiClassLoaderSearch.c + jvmtiEventManagement.c + jvmtiExtensionMechanism.c + jvmtiField.c + jvmtiForceEarlyReturn.c + jvmtiFunctionTable.c + jvmtiGeneral.c + jvmtiHeap.c + jvmtiHeap10.c + jvmtiHelpers.c + jvmtiHook.c + jvmtiJNIFunctionInterception.c + jvmtiLocalVariable.c + jvmtiMemory.c + jvmtiMethod.c + jvmtiModules.c + jvmtiObject.c + jvmtiRawMonitor.c + jvmtiStackFrame.c + jvmtiStartup.c + jvmtiSystemProperties.c + jvmtiThread.c + jvmtiThreadGroup.c + jvmtiTimers.c + jvmtiWatchedField.c + + ut_j9jvmti.c +) + +target_link_libraries(j9jvmti + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_compiler_defines + + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9thr + j9stackmap + j9hookable + j9zip +) + +install( + TARGETS j9jvmti + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/libffi/CMakeLists.txt b/runtime/libffi/CMakeLists.txt new file mode 100644 index 00000000000..9b170c0f8c8 --- /dev/null +++ b/runtime/libffi/CMakeLists.txt @@ -0,0 +1,89 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(ffi SHARED + closures.c + debug.c + java_raw_api.c + prep_cif.c + raw_api.c + types.c + +) + +# We need this because ffi_common.h is in 'include' in the top directory. +# once we fix that this can go away +target_include_directories(ffi PRIVATE ../include) +#platform specific stuff hacked in +if(OMR_ARCH_X86) + target_sources(ffi + PRIVATE + x86/ffi.c + x86/ffi64.c + x86/sysv.S + x86/unix64.S + ) +elseif(OMR_ARCH_POWER) + if(CMAKE_CXX_COMPILER_ID STREQUAL "XL") + set(CMAKE_ASM_FLAGS "-qalias=noansi -qxflag=LTOL:LTOL0 -qxflag=selinux -qarch=ppc64 -q64") + endif() + target_sources(ffi + PRIVATE + powerpc/ffi.c + powerpc/ppc_closure.S + powerpc/sysv.S + powerpc/linux64.S + powerpc/linux64_closure.S + powerpc/ffi_linux64.c + powerpc/ffi_sysv.c + ) + set_source_files_properties( + powerpc/ppc_closure.S + powerpc/sysv.S + powerpc/linux64.S + powerpc/linux64_closure.S + PROPERTIES + LANGUAGE ASM + ) +endif() + + +target_include_directories(ffi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +if(OMR_ARCH_X86) #TODO check 64bit + target_include_directories(ffi + PUBLIC + preconf/xa + x86 + ) +elseif(OMR_ARCH_POWER) + if(OMR_ENV_LITTLE_ENDIAN) + target_include_directories(ffi PUBLIC preconf/xl64) + else() + target_include_directories(ffi PUBLIC preconf/xp64) + endif() + target_include_directories(ffi PUBLIC powerpc) +endif() + +install( + TARGETS ffi + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/mgmt/CMakeLists.txt b/runtime/mgmt/CMakeLists.txt new file mode 100644 index 00000000000..66f2572a6a3 --- /dev/null +++ b/runtime/mgmt/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_library(management SHARED + mgmtinit.c +) + +target_link_libraries(management + PRIVATE + j9vm_interface +) + +add_library(management_ext SHARED + mgmtinit.c +) + +target_link_libraries(management_ext + PRIVATE + j9vm_interface +) + + +install( + TARGETS management management_ext + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/port/CMakeLists.txt b/runtime/port/CMakeLists.txt new file mode 100644 index 00000000000..2d2e06c52d0 --- /dev/null +++ b/runtime/port/CMakeLists.txt @@ -0,0 +1,136 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9prt SHARED + ut_j9prt.c +) + +set(OBJECTS "") +list(APPEND OBJECTS + j9hypervisor.c + j9hypervisor_common.c + j9ipcmutex.c + j9SysvIPCWrappers.c + j9port.c + j9process.c + j9gs.c + j9gp.c + j9sharedhelper.c + j9shmem.c + j9shsem.c + j9shsem_deprecated.c + j9sock.c + j9sockptb.c + j9sysinfo.c + j9sysinfo_helpers.c + j9mem_basic.c + j9portcontrol.c +) +if(OMR_ARCH_X86) + list(APPEND OBJECTS + j9hypervisor_i386.c + #j9hypervisor_vmware.c + j9sysinfo_helpers.c + ) +elseif(OMR_ARCH_POWER) + list(APPEND OBJECTS j9hypervisor_systemp.c) +endif() + +if(J9VM_PORT_RUNTIME_INSTRUMENTATION) + list(APPEND OBJECTS j9ri.c) +endif() + +#ut_j9prt + +set(resolvedPaths "") +set(VPATH "") + +if(OMR_ARCH_X86) #TODO and linux + list(APPEND VPATH linuxamd64) +elseif(OMR_ARCH_POWER) #TODO and linux + list(APPEND VPATH linuxppc) +endif() + +list(APPEND VPATH + linux + sysvipc + unix + common +) + +omr_find_files(resolvedPaths + PATHS + ${VPATH} + FILES + ${OBJECTS} +) + +add_tracegen(common/j9prt.tdf) + + +target_sources(j9prt + PRIVATE + ${resolvedPaths} + $ +) +target_link_libraries(j9prt + PUBLIC + #omr_interface + j9vm_interface + + + PRIVATE + j9vm_nls + j9utilcore + j9pool + j9hashtable + j9thr + #TODO fix this + dl + rt + +) + +target_compile_definitions(j9prt + PRIVATE + -DJ9PORT_LIBRARY_DEFINE +) + +target_include_directories(j9prt + PRIVATE + unix + unix_include + PUBLIC + include + common + PRIVATE + #TODO should be INTERFACE_INCLUDE_DIRECTORIES + $ + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) + + +install( + TARGETS j9prt + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/rasdump/CMakeLists.txt b/runtime/rasdump/CMakeLists.txt new file mode 100644 index 00000000000..d66823f6bc2 --- /dev/null +++ b/runtime/rasdump/CMakeLists.txt @@ -0,0 +1,67 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9dmp.tdf) +add_library(j9dmp SHARED + dmpagent.c + dmpmap.c + dmpqueue.c + dmpsup.c + FileStream.cpp + heapdump.cpp + heapdump_classic.c + javadump.cpp + + #Only on zos + #jobname.s + TextFileStream.cpp + trigger.c + + ut_j9dmp.c +) + +target_link_libraries(j9dmp + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrsig + j9util + j9utilcore + j9avl + j9hashtable + j9thr + j9pool + j9zlib + j9hookable + j9zip +) + +target_include_directories(j9dmp + PRIVATE + ../shared_common +) +install( + TARGETS j9dmp + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) + diff --git a/runtime/rastrace/CMakeLists.txt b/runtime/rastrace/CMakeLists.txt new file mode 100644 index 00000000000..ef050c22e7e --- /dev/null +++ b/runtime/rastrace/CMakeLists.txt @@ -0,0 +1,75 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(dg.tdf) +add_tracegen(j9trc.tdf) +add_tracegen(j9trc_aux.tdf) +add_tracegen(mt.tdf) + +add_library(j9trc SHARED + method_trace.c + method_trigger.c + trccomponent.c + trcengine.c + trcformatter.c + trclog.c + trcmain.c + trcmisc.c + trcoptions.c + trcqueue.c + trctrigger.c + trcwrappers.c + + ut_dg.c + ut_j9trc.c + ut_j9trc_aux.c + ut_mt.c +) + +target_include_directories(j9trc + PRIVATE + ../omr/include_core + ../nls + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(j9trc + PRIVATE + j9vm_interface + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9thr + j9stackmap + omrcore + #TODO: why isnt this in the module.xml? + j9hookable +) + + +install( + TARGETS j9trc + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) + diff --git a/runtime/redirector/CMakeLists.txt b/runtime/redirector/CMakeLists.txt new file mode 100644 index 00000000000..e8064095fd4 --- /dev/null +++ b/runtime/redirector/CMakeLists.txt @@ -0,0 +1,74 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Dont append version suffix +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +#TODO this still relies on UMA to generate the source files +include_directories(../j9vm) + +add_library(j9vm_redirector_common INTERFACE) +target_sources(j9vm_redirector_common + INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/generated.c + ${CMAKE_CURRENT_SOURCE_DIR}/redirector.c +) +add_library(jvm_b150_redirect SHARED + generated.c + redirector.c +) +target_link_libraries(jvm_b150_redirect + PRIVATE + j9vm_interface + j9vm_nls + dl +) +set_target_properties(jvm_b150_redirect PROPERTIES LIBRARY_OUTPUT_NAME jvm_b150) + +add_library(jvm_b156_redirect SHARED + generated.c + redirector.c +) +target_link_libraries(jvm_b156_redirect + PRIVATE + j9vm_interface + j9vm_nls + dl +) +set_target_properties(jvm_b156_redirect PROPERTIES LIBRARY_OUTPUT_NAME jvm_b156) + +add_library(jvm_redirect SHARED + generated.c + redirector.c +) +target_link_libraries(jvm_redirect + PRIVATE + j9vm_interface + j9vm_nls + dl +) +set_target_properties(jvm_redirect PROPERTIES LIBRARY_OUTPUT_NAME jvm) + +install( + TARGETS jvm_b150_redirect jvm_b156_redirect jvm_redirect + LIBRARY DESTINATION ${j9vm_SOURCE_DIR}/redirector +) diff --git a/runtime/runtimetools/CMakeLists.txt b/runtime/runtimetools/CMakeLists.txt new file mode 100644 index 00000000000..24b3b0de574 --- /dev/null +++ b/runtime/runtimetools/CMakeLists.txt @@ -0,0 +1,31 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_subdirectory(agentbase) +add_subdirectory(balloon) +add_subdirectory(javacoregen) +add_subdirectory(jlm) +add_subdirectory(memorywatcher) +add_subdirectory(migration) +add_subdirectory(osmemory) +add_subdirectory(softmxtest) +add_subdirectory(vmruntimestateagent) diff --git a/runtime/runtimetools/agentbase/CMakeLists.txt b/runtime/runtimetools/agentbase/CMakeLists.txt new file mode 100644 index 00000000000..ef75d8be37f --- /dev/null +++ b/runtime/runtimetools/agentbase/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(tools_agentbase STATIC + RuntimeToolsAgentBase.cpp + RuntimeToolsIntervalAgent.cpp +) + +target_include_directories(tools_agentbase + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} +) +target_link_libraries(tools_agentbase + PRIVATE + j9vm_interface + + j9prt + j9thr + j9util + j9utilcore +) diff --git a/runtime/runtimetools/balloon/CMakeLists.txt b/runtime/runtimetools/balloon/CMakeLists.txt new file mode 100644 index 00000000000..efbc0baa2e6 --- /dev/null +++ b/runtime/runtimetools/balloon/CMakeLists.txt @@ -0,0 +1,38 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(balloon SHARED + BalloonAgent.cpp +) +target_link_libraries(balloon + PRIVATE + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS balloon + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/runtimetools/javacoregen/CMakeLists.txt b/runtime/runtimetools/javacoregen/CMakeLists.txt new file mode 100644 index 00000000000..2eb95039cd5 --- /dev/null +++ b/runtime/runtimetools/javacoregen/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(jcoregen SHARED + JavacoreGenAgent.cpp +) + +target_link_libraries(jcoregen + PRIVATE + j9vm_interface + + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS jcoregen + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/runtimetools/jlm/CMakeLists.txt b/runtime/runtimetools/jlm/CMakeLists.txt new file mode 100644 index 00000000000..9e0b46c9dc6 --- /dev/null +++ b/runtime/runtimetools/jlm/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(jlmagent SHARED + JLMAgent.cpp +) + +target_link_libraries(jlmagent + PRIVATE + j9vm_interface + + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS jlmagent + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/runtimetools/memorywatcher/CMakeLists.txt b/runtime/runtimetools/memorywatcher/CMakeLists.txt new file mode 100644 index 00000000000..50e103ef048 --- /dev/null +++ b/runtime/runtimetools/memorywatcher/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(memorywatcher SHARED + MemoryWatcherAgent.cpp +) + +target_link_libraries(memorywatcher + PRIVATE + j9vm_interface + + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS memorywatcher + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/runtimetools/migration/CMakeLists.txt b/runtime/runtimetools/migration/CMakeLists.txt new file mode 100644 index 00000000000..6ec9157b8d5 --- /dev/null +++ b/runtime/runtimetools/migration/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Dont append version suffix +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_library(migration SHARED + MigrationAgent.cpp +) + +target_link_libraries(migration + PRIVATE + j9vm_interface + + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS migration + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/runtimetools/osmemory/CMakeLists.txt b/runtime/runtimetools/osmemory/CMakeLists.txt new file mode 100644 index 00000000000..33c3b277ed4 --- /dev/null +++ b/runtime/runtimetools/osmemory/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(osmemory SHARED + OSMemoryAgent.cpp +) + +target_link_libraries(osmemory + PRIVATE + j9vm_interface + + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS osmemory + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/runtimetools/softmxtest/CMakeLists.txt b/runtime/runtimetools/softmxtest/CMakeLists.txt new file mode 100644 index 00000000000..6f5b63ef315 --- /dev/null +++ b/runtime/runtimetools/softmxtest/CMakeLists.txt @@ -0,0 +1,45 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Dont append version suffix +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_library(softmxtest SHARED + SoftMxTest.cpp +) + +target_link_libraries(softmxtest + PRIVATE + j9vm_interface + j9vm_gc_includes + + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS softmxtest + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/runtimetools/vmruntimestateagent/CMakeLists.txt b/runtime/runtimetools/vmruntimestateagent/CMakeLists.txt new file mode 100644 index 00000000000..44b2cf080d6 --- /dev/null +++ b/runtime/runtimetools/vmruntimestateagent/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(vmruntimestateagent SHARED + VMRuntimeStateAgent.cpp +) + +target_link_libraries(vmruntimestateagent + PRIVATE + j9vm_interface + + j9prt + j9thr + j9util + j9utilcore + tools_agentbase +) + +install( + TARGETS vmruntimestateagent + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/shared/CMakeLists.txt b/runtime/shared/CMakeLists.txt new file mode 100644 index 00000000000..e0ca0f40005 --- /dev/null +++ b/runtime/shared/CMakeLists.txt @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9shr SHARED + shrclssup.c +) +target_link_libraries(j9shr + PRIVATE + j9vm_interface + j9vm_nls + + j9shrcommon + j9shrutil + j9thr + j9zip +) + +install( + TARGETS j9shr + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/shared_common/CMakeLists.txt b/runtime/shared_common/CMakeLists.txt new file mode 100644 index 00000000000..bf78e98ac60 --- /dev/null +++ b/runtime/shared_common/CMakeLists.txt @@ -0,0 +1,71 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9shr.tdf) +add_library(j9shrcommon STATIC + AttachedDataManagerImpl.cpp + ByteDataManagerImpl.cpp + CacheLifecycleManager.cpp + CacheMap.cpp + ClassDebugDataProvider.cpp + ClasspathItem.cpp + ClasspathManagerImpl2.cpp + CompiledMethodManagerImpl.cpp + CompositeCache.cpp + hookhelpers.cpp + Manager.cpp + ManagerHintTable.cpp + Managers.cpp + OSCache.cpp + OSCacheFile.cpp + OSCachemmap.cpp + OSCachesysv.cpp + OSCachevmem.cpp + ROMClassManagerImpl.cpp + ROMClassResourceManager.cpp + SCImplementedAPI.cpp + ScopeManagerImpl.cpp + shrinit.cpp + TimestampManagerImpl.cpp + ut_j9shr.c +) +target_include_directories(j9shrcommon + PRIVATE + ../omr/include_core + ../nls + ../shared + ../shared_util + ../verbose + PUBLIC + ${CMAKE_CURRENT_BINARY_DIR} + include + . +) +target_link_libraries(j9shrcommon + PRIVATE + j9vm_interface + j9pool + j9hashtable + j9utilcore + j9util + #j9thr +) diff --git a/runtime/shared_util/CMakeLists.txt b/runtime/shared_util/CMakeLists.txt new file mode 100644 index 00000000000..bcff75fa763 --- /dev/null +++ b/runtime/shared_util/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9shrutil STATIC + classpathcache.c + shcdatautils.c +) +target_include_directories(j9shrutil + PRIVATE + ../omr/include_core + PUBLIC + . +) + +target_link_libraries(j9shrutil + PRIVATE + j9vm_interface + j9shrcommon +) + diff --git a/runtime/simplepool/CMakeLists.txt b/runtime/simplepool/CMakeLists.txt new file mode 100644 index 00000000000..bb546990fd7 --- /dev/null +++ b/runtime/simplepool/CMakeLists.txt @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(simplepool.tdf) + +add_library(j9simplepool STATIC + simplepool.c + ${CMAKE_CURRENT_BINARY_DIR}/ut_simplepool.c +) +target_include_directories(j9simplepool + PRIVATE + ../omr/include_core + ${CMAKE_CURRENT_BINARY_DIR} +) +target_link_libraries(j9simplepool + PRIVATE + j9vm_interface +) diff --git a/runtime/stackmap/CMakeLists.txt b/runtime/stackmap/CMakeLists.txt new file mode 100644 index 00000000000..039ac7f2a53 --- /dev/null +++ b/runtime/stackmap/CMakeLists.txt @@ -0,0 +1,46 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(map.tdf) + +add_library(j9stackmap STATIC + debuglocalmap.c + fixreturns.c + localmap.c + mapmemorybuffer.c + maxmap.c + stackmap.c + ${CMAKE_CURRENT_BINARY_DIR}/ut_map.c +) + +target_include_directories(j9stackmap + PRIVATE + ../omr/include_core + ${CMAKE_CURRENT_BINARY_DIR} + ../nls +) + +target_link_libraries(j9stackmap + PRIVATE + j9vm_interface + j9util +) diff --git a/runtime/sunvmi/CMakeLists.txt b/runtime/sunvmi/CMakeLists.txt new file mode 100644 index 00000000000..4c96219c466 --- /dev/null +++ b/runtime/sunvmi/CMakeLists.txt @@ -0,0 +1,43 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(sunvmi.tdf) + +add_library(sunvmi STATIC + sunvmi.c + ut_sunvmi.c +) + +target_include_directories(sunvmi + PRIVATE + ../jcl +) + +target_link_libraries(sunvmi + PRIVATE + j9vm_interface + j9vm_gc_includes + + j9util +) + +add_dependencies(sunvmi omrgc_hookgen omrgc_tracegen) diff --git a/runtime/tests/CMakeLists.txt b/runtime/tests/CMakeLists.txt new file mode 100644 index 00000000000..30fdb686e76 --- /dev/null +++ b/runtime/tests/CMakeLists.txt @@ -0,0 +1,45 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# We dont want to suffix vm version to shared libs +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +#add_subdirectory(aixerrmsg) +add_subdirectory(algorithm) +add_subdirectory(bcprof) +add_subdirectory(bcverify) +add_subdirectory(cutest) +add_subdirectory(gp) +add_subdirectory(j9vm) +add_subdirectory(jni) +add_subdirectory(jniarg) +add_subdirectory(lazyclassload) +add_subdirectory(port) +add_subdirectory(props) +#add_subdirectory(redirector) +add_subdirectory(shared) +#add_subdirectory(shared_service) +add_subdirectory(thread) +#add_subdirectory(unresolved) +add_subdirectory(vm) +add_subdirectory(vm_lifecycle) +#add_subdirectory(zos) diff --git a/runtime/tests/algorithm/CMakeLists.txt b/runtime/tests/algorithm/CMakeLists.txt new file mode 100644 index 00000000000..61523993fc0 --- /dev/null +++ b/runtime/tests/algorithm/CMakeLists.txt @@ -0,0 +1,50 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(algotest + algotest.c + argscantest.c + primenumberhelpertest.c + sendslottest.c + simplepooltest.c + srphashtabletest.c + wildcardtest.c +) + +target_link_libraries(algotest + PRIVATE + j9vm_interface + j9vm_main_wrapper + + j9prt + j9exelib + j9util + j9utilcore + j9thr + j9pool + j9simplepool +) + +install( + TARGETS algotest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/bcprof/CMakeLists.txt b/runtime/tests/bcprof/CMakeLists.txt new file mode 100644 index 00000000000..3e94d4eab94 --- /dev/null +++ b/runtime/tests/bcprof/CMakeLists.txt @@ -0,0 +1,34 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(bcproftest SHARED + bcproftest.c +) +target_link_libraries(bcproftest + PRIVATE + j9vm_interface +) + +install( + TARGETS bcproftest + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/bcverify/CMakeLists.txt b/runtime/tests/bcverify/CMakeLists.txt new file mode 100644 index 00000000000..e9c1b62e4a8 --- /dev/null +++ b/runtime/tests/bcverify/CMakeLists.txt @@ -0,0 +1,65 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# TODO this is kinda gross, but cmake cant seem to figure out +# files generated in other CMakeLists.txts +#add_tracegen(${j9vm_SOURCE_DIR}/bcverify/j9bcverify.tdf) +add_library(bcuwhite SHARED + natives/bcvnatives.c + + #TODO this is kinda gross. Should be refactores + ../../bcverify/bcverify.c + ../../bcverify/clconstraints.c + ../../bcverify/rtverify.c + ../../bcverify/staticverify.c + ../../bcverify/vrfyconvert.c + ../../bcverify/vrfyhelp.c + $ + #ut_j9bcverify.c +) +add_dependencies(bcuwhite j9bcv) + +target_link_libraries(bcuwhite + PRIVATE + j9vm_interface + j9vm_gc_includes + #j9bcv_tracegen + + j9verutil + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9thr + j9stackmap +) + +target_include_directories(bcuwhite + PRIVATE + ${j9vm_SOURCE_DIR}/shared_common/include +) + +install( + TARGETS bcuwhite + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/cutest/CMakeLists.txt b/runtime/tests/cutest/CMakeLists.txt new file mode 100644 index 00000000000..fe09915f0f4 --- /dev/null +++ b/runtime/tests/cutest/CMakeLists.txt @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(cutest STATIC + CuTest.c + parser.c + XMLBenchOutputWriter.cpp +) + +target_include_directories(cutest + PUBLIC + . +) + +target_link_libraries(cutest + PRIVATE + j9vm_interface + + j9prt + j9util + j9utilcore + j9thr +) diff --git a/runtime/tests/gp/CMakeLists.txt b/runtime/tests/gp/CMakeLists.txt new file mode 100644 index 00000000000..1bc62f848b1 --- /dev/null +++ b/runtime/tests/gp/CMakeLists.txt @@ -0,0 +1,38 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(gptest.tdf) + +add_library(gptest SHARED + gptest.c + ut_gptest.c +) +target_link_libraries(gptest + PRIVATE + j9vm_interface + pthread +) + +install( + TARGETS gptest + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/j9vm/CMakeLists.txt b/runtime/tests/j9vm/CMakeLists.txt new file mode 100644 index 00000000000..c57abbe3cbc --- /dev/null +++ b/runtime/tests/j9vm/CMakeLists.txt @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9vmtest SHARED + jvmjni.c +) + +target_link_libraries(j9vmtest + PRIVATE + j9vm_interface + + jvm +) + +install( + TARGETS j9vmtest + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/jni/CMakeLists.txt b/runtime/tests/jni/CMakeLists.txt new file mode 100644 index 00000000000..e4f2294ec21 --- /dev/null +++ b/runtime/tests/jni/CMakeLists.txt @@ -0,0 +1,48 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9ben SHARED + critical.c + DeadlockNativeTest.c + jnibench.c + jnierrors.c + jnimark.c + jniReturnInvalidReference.c + jnitest.c + memoryCheckTest.c + montest.c + objectfieldutils.c + reattach.c + threadtest.c +) + +target_link_libraries(j9ben + PRIVATE + j9vm_interface + j9thr + jvm +) + +install( + TARGETS j9ben + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/jniarg/CMakeLists.txt b/runtime/tests/jniarg/CMakeLists.txt new file mode 100644 index 00000000000..104f7944eb6 --- /dev/null +++ b/runtime/tests/jniarg/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(jniargtests SHARED + args_01.c + args_02.c + args_03.c + args_04.c + args_05.c + args_06.c + args_07.c + args_08.c + args_09.c + cdefs.c +) + +target_link_libraries(jniargtests + PRIVATE + j9vm_interface +) + +install( + TARGETS jniargtests + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/lazyclassload/CMakeLists.txt b/runtime/tests/lazyclassload/CMakeLists.txt new file mode 100644 index 00000000000..08380ada3f7 --- /dev/null +++ b/runtime/tests/lazyclassload/CMakeLists.txt @@ -0,0 +1,35 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9lazyClassLoad SHARED + lazycloassload.c +) +target_link_libraries(j9lazyClassLoad + PRIVATE + j9vm_interface + jvm +) + +install( + TARGETS j9lazyClassLoad + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/port/CMakeLists.txt b/runtime/tests/port/CMakeLists.txt new file mode 100644 index 00000000000..fa458d86168 --- /dev/null +++ b/runtime/tests/port/CMakeLists.txt @@ -0,0 +1,70 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(pltest + j9cudaTest.c + j9dumpTest.c + j9errorTest.c + j9fileTest.c + j9heapTest.c + j9hypervisorTest.c + j9memTest.c + j9mmapTest.c + j9nlsTest.c + j9portTest.c + j9processTest.c + j9riTest.c + j9shsem_deprecatedTest.c + j9shsemTest.c + j9signalExtendedTest.c + j9signalTest.c + j9slTest.c + j9sockTest.c + j9strTest.c + j9timeTest.c + j9ttyExtendedTest.c + j9ttyTest.c + j9vmemTest.c + main.c + shmem.c + si_numcpusTest.c + si.c + socket.c + testHelpers.c + testProcessHelpers.c +) + +target_link_libraries(pltest + PRIVATE + j9vm_main_wrapper + j9prt + j9pool + j9utilcore + j9avl + j9hashtable + j9thr +) + +install( + TARGETS pltest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/props/CMakeLists.txt b/runtime/tests/props/CMakeLists.txt new file mode 100644 index 00000000000..b06cdc8c687 --- /dev/null +++ b/runtime/tests/props/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(propstest + main.c + suite.c +) + +target_link_libraries(propstest + PRIVATE + j9vm_interface + j9vm_main_wrapper + + cutest + j9prt + j9pool + j9exelib + j9util + j9utilcore + j9avl + j9hashtable + j9thr +) + +install( + TARGETS propstest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/shared/CMakeLists.txt b/runtime/tests/shared/CMakeLists.txt new file mode 100644 index 00000000000..8de04a21022 --- /dev/null +++ b/runtime/tests/shared/CMakeLists.txt @@ -0,0 +1,98 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(shrtest + AOTDataMinMaxTest.cpp + AttachedDataMinMaxTest.cpp + AttachedDataTest.cpp + ByteDataTest.cpp + CacheDirPerm.cpp + CacheFullTests.cpp + CacheMapTest.cpp + ClassDebugDataTests.cpp + ClasspathCacheTest.cpp + ClasspathItemTest.cpp + CompiledMethodTest.cpp + CompositeCacheSizesTests.cpp + CompositeCacheTest.cpp + CorruptCacheTest.cpp + OpenCacheHelper.cpp + OSCacheTest.cpp + OSCacheTestMisc.cpp + OSCacheTestMmap.cpp + OSCacheTestSysv.cpp + ProcessHelper.cpp + ProtectNewROMClassDataTests.cpp + ProtectSharedCacheDataTests.cpp + SCStoreTransactionTests.cpp + SCStoreWithBCITests.cpp + SCStringTransactionTests.cpp + SCTestCommon.cpp + SharedCacheAPITest.cpp + main.c +) + +target_link_libraries(shrtest + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_main_wrapper + + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9simplepool + j9thr + j9prt + j9shrcommon + j9shrutil + j9exelib + j9util + j9utilcore + j9zip + j9zlib + j9hookable +) + +target_compile_definitions(shrtest + PRIVATE + -DJ9VM_SHRTEST +) + +add_library(SharedClassesNativeAgent SHARED + jvmti/SharedClassesNativeAgent.c +) + +target_link_libraries(SharedClassesNativeAgent + PRIVATE + j9vm_interface + + j9prt +) + +install( + TARGETS shrtest SharedClassesNativeAgent + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/shared_service/CMakeLists.txt b/runtime/tests/shared_service/CMakeLists.txt new file mode 100644 index 00000000000..76bb8a6c5b6 --- /dev/null +++ b/runtime/tests/shared_service/CMakeLists.txt @@ -0,0 +1,46 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(servicetest + SharedService.c +) + +target_link_libraries(servicetest + PRIVATE + j9vm_interface + + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9thr + j9prt + j9shrcommon + j9shrutil + j9exelib +) + +install( + TARGETS servicetest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/thread/CMakeLists.txt b/runtime/tests/thread/CMakeLists.txt new file mode 100644 index 00000000000..23a09a128b5 --- /dev/null +++ b/runtime/tests/thread/CMakeLists.txt @@ -0,0 +1,103 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +#re-enable version num suffix +set(CMAKE_SHARED_LIBRARY_SUFFIX "29${CMAKE_SHARED_LIBRARY_SUFFIX}") + +add_library(thread_cutest_harness STATIC + cuharness/CuTest.c + cuharness/parser.c +) + +target_include_directories(thread_cutest_harness + PUBLIC + cuharness +) + +target_link_libraries(thread_cutest_harness + PRIVATE + j9vm_interface + + j9prt + j9util + j9utilcore + j9thr +) + + +add_library(j9thrtestnatives SHARED + testnatives/testnatives.c +) + +target_include_directories(j9thrtestnatives + PRIVATE + testnatives +) + +target_link_libraries(j9thrtestnatives + PRIVATE + j9vm_interface + + j9util + j9utilcore + j9thr +) + +add_library(j9thrnumanatives SHARED + thrnumanatives/thrnumanatives.c +) + +target_link_libraries(j9thrnumanatives + PRIVATE + j9vm_interface +) + +add_executable(thrstatetest + thrstate/runtest.c + thrstate/testcases1.c + thrstate/testcases2.c + thrstate/testcases3.c + thrstate/testcases4.c + thrstate/testcases5.c + thrstate/testcases6.c + thrstate/testsetup.c +) + +target_link_libraries(thrstatetest + PRIVATE + j9vm_main_wrapper + + j9prt + j9exelib + j9util + j9utilcore + j9hashtable + j9avl + j9thr + j9pool +) + +install( + TARGETS j9thrtestnatives j9thrnumanatives thrstatetest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/vm/CMakeLists.txt b/runtime/tests/vm/CMakeLists.txt new file mode 100644 index 00000000000..a621d4170d9 --- /dev/null +++ b/runtime/tests/vm/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(vmtest + resolvefield_tests.c + testHelpers.c + vmstubs.c + vmtest.c + + #TODO this should maybe be refactored? + ../../vm/description.c + ../../vm/KeyHashTable.c + ../../vm/ModularityHashTables.c + ../../vm/resolvefield.cpp + ../../vm/ObjectFieldInfo.cpp + ../../vm/segment.c + ../../vm/visible.c + ../../vm/vmthinit.c + ../../vm/stringhelpers.cpp + $ +) + +target_compile_definitions(vmtest + PRIVATE + J9VM_TEST +) + +target_link_libraries(vmtest + PRIVATE + #j9vm_interface + j9vm_gc_includes + j9vm_main_wrapper + + j9exelib + j9prt + j9verutil + j9util + j9utilcore + j9avl + j9hashtable + j9thr + j9stackmap + j9pool + j9simplepool + j9bcv + j9dyn + j9hookable + j9vm +) + +install( + TARGETS vmtest + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tests/vm_lifecycle/CMakeLists.txt b/runtime/tests/vm_lifecycle/CMakeLists.txt new file mode 100644 index 00000000000..b67c3c56493 --- /dev/null +++ b/runtime/tests/vm_lifecycle/CMakeLists.txt @@ -0,0 +1,48 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_executable(vmLifecyleTests + main.c +) + +target_link_libraries(vmLifecyleTests + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_main_wrapper + + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9thr + j9prt + j9exelib + j9zip + j9hookable +) + +install( + TARGETS vmLifecyleTests + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/thrtrace/CMakeLists.txt b/runtime/thrtrace/CMakeLists.txt new file mode 100644 index 00000000000..0d528293405 --- /dev/null +++ b/runtime/thrtrace/CMakeLists.txt @@ -0,0 +1,38 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Dont append version suffix +set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX}) + +add_library(thrtrace SHARED + thrtrace.c +) + +target_link_libraries(thrtrace + PRIVATE + j9vm_interface +) + +install( + TARGETS thrtrace + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tr.source/trj9/CMakeLists.txt b/runtime/tr.source/trj9/CMakeLists.txt new file mode 100644 index 00000000000..74378508a72 --- /dev/null +++ b/runtime/tr.source/trj9/CMakeLists.txt @@ -0,0 +1,210 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# This CMakeLists is included by the VM CMake lists, and works after composition +# has occurred. +# +# Relies on a few pieces of OMR, and a few pieces of the VM CMakeLists. +# +# Longer term, this will of course have to collapse into the VM builds. + +set(J9SRC ../../) +# Absolutize the J9SRC mostly to make it easier to read the paths. +get_filename_component(J9SRC ${J9SRC} ABSOLUTE) + + +# The Makefiles specified the OMR in the VM tree, and this does the same +# does the same. +set(OMR_ROOT ../../omr ) + +# Absolutize the OMR_ROOT, which is required +# for MASM2GAS. +get_filename_component(OMR_ROOT ${OMR_ROOT} ABSOLUTE) + +set(CMAKE_MODULE_PATH "${OMR_ROOT}/cmake/modules" ${CMAKE_MODULE_PATH}) + +include(${OMR_ROOT}/cmake/compiler_support.cmake) + +# Override masm2gas with J9JIT version until we've +# resolved the divergence. +set(masm2gas_path build/scripts/masm2gas.pl ) +get_filename_component(masm2gas_path ${masm2gas_path} ABSOLUTE) +set(MASM2GAS_PATH ${masm2gas_path} CACHE INTERNAL "MASM2GAS PATH") + +# The list of files that are added to the compiler in addition +# To the defaults provided by create_omr_compiler_library +set(J9JIT_FILES "" CACHE INTERNAL "The computed list of j9jit files") + +# Used inside added subdirectories to help +# fill in the object list +macro(j9jit_files) + set(J9JIT_FILES ${J9JIT_FILES} ${ARGN} CACHE INTERNAL "The computed list of j9jit files") +endmacro(j9jit_files) + + +# Add our subdirs. +add_subdirectory(codegen) +add_subdirectory(compile) +add_subdirectory(control) +add_subdirectory(env) +add_subdirectory(il) +add_subdirectory(ilgen) +add_subdirectory(infra) +add_subdirectory(optimizer) +add_subdirectory(ras) +add_subdirectory(runtime) + +# Should this be conditional? +if(TR_HOST_ARCH STREQUAL "x" OR TR_TARGET_ARCH STREQUAL "x") + add_subdirectory(x) +endif() +if(TR_HOST_ARCH STREQUAL "p" OR TR_TARGET_ARCH STREQUAL "p") + add_subdirectory(p) +endif() +if(TR_HOST_ARCH STREQUAL "z" OR TR_TARGET_ARCH STREQUAL "z") + add_subdirectory(z) +endif() +if(TR_HOST_ARCH STREQUAL "arm" OR TR_TARGET_ARCH STREQUAL "arm") + add_subdirectory(arm) +endif() + +# Some files in OMR provide duplicate or extra functionality not needed +# in J9, so we need to remove them +set(REMOVED_OMR_FILES + ${OMR_ROOT}/compiler/control/CompileMethod.cpp + ${OMR_ROOT}/compiler/control/CompilationController.cpp + ${OMR_ROOT}/compiler/env/FEBase.cpp + ${OMR_ROOT}/compiler/optimizer/FEInliner.cpp + ${OMR_ROOT}/compiler/env/JitConfig.cpp + ${OMR_ROOT}/compiler/env/PersistentAllocator.cpp + ${OMR_ROOT}/compiler/env/SystemSegmentProvider.cpp + ${OMR_ROOT}/compiler/infra/OMRMonitor.cpp + ${OMR_ROOT}/compiler/runtime/Trampoline.cpp + ${OMR_ROOT}/compiler/runtime/Runtime.cpp + ${OMR_ROOT}/compiler/ilgen/IlBuilder.cpp + ${OMR_ROOT}/compiler/ilgen/IlValue.cpp + ${OMR_ROOT}/compiler/ilgen/IlInjector.cpp + ${OMR_ROOT}/compiler/ilgen/MethodBuilder.cpp + ${OMR_ROOT}/compiler/ilgen/BytecodeBuilder.cpp + ${OMR_ROOT}/compiler/ilgen/TypeDictionary.cpp + ${OMR_ROOT}/compiler/ilgen/ThunkBuilder.cpp + ${OMR_ROOT}/compiler/ilgen/VirtualMachineOperandStack.cpp +) + +# Extra defines not provided by the create_omr_compiler_library call +set(TARGET_DEFINES + J9_PROJECT_SPECIFIC + _LONG_LONG #? +) + +# When VM is built with CMake, we should just use the +# INTERFACE specification of target_link_libraries, +# though that would also involve teaching MASM2GAS and +# PASM2ASM about target includes. +# +# In the mean time, like the makefiles, this is is using +# the inlcudes from the SDK +set(J9_INCLUDES + # From jitinclude.mk + ${J9SRC}/omr/include_core + ${J9SRC}/omr/thread + ${J9SRC}/omr/gc/include + # endjitinclude.mk + ../ # Frustratingly there are some #include "trj9/frob/baz.hpp" refs which require this. + ${J9SRC}/codert_vm + ${J9SRC}/gc_include + ${J9SRC}/include + ${J9SRC}/gc_glue_java + ${J9SRC}/jit_vm + ${J9SRC}/nls + ${J9SRC}/oti + ${J9SRC}/util +) +# Platform specific list of flags, derived directly from the +# Makefiles +set(J9_SHAREDFLAGS + -fno-strict-aliasing + -Wno-deprecated + -Wno-enum-compare + -Wno-write-strings + -fomit-frame-pointer + -fasynchronous-unwind-tables + -fno-dollars-in-identifiers + -Wreturn-type + -pthread +) + +# Platform specific CXX flags, also derived from the +# Makefiles +set(J9_CXXFLAGS + ${J9_SHAREDFLAGS} + -fno-rtti + -fno-threadsafe-statics + -Wno-invalid-offsetof +) + +omr_stringify(J9_SHAREDLAGS_STR ${J9_SHAREDFLAGS}) +omr_stringify(J9_CXXFLAGS_STR ${J9_CXX_FLAGS}) + +# Note: This is explicitly overriding what's provided by +# the VM CMakeLists, as they pass -fno-exceptions +# right now, and the JIT needs exceptions +set(CMAKE_CXX_FLAGS "${J9_CXXFLAGS_STR}") +set(CMAKE_C_FLAGS "${J9_SHAREDFLAGS_STR} -std=gnu89") + +set(JIT_TARGET_LIBS + j9avl + j9codert_vm + j9hashtable + j9jit_vm + j9pool + j9stackmap + j9util + j9utilcore + j9hookable + j9thr +) + + +create_omr_compiler_library(NAME j9jit + SHARED + OBJECTS ${J9_FILES} ${J9JIT_FILES} ${NOT_EXFRRED} + DEFINES J9_PROJECT_SPECIFIC ${TARGET_DEFINES} + INCLUDES ${J9_INCLUDES} + FILTER ${REMOVED_OMR_FILES}) + + + +target_link_libraries(j9jit PRIVATE + ${JIT_TARGET_LIBS} ${JIT_TARGET_LIBS} ${JIT_TARGET_LIBS} + m #maaaath + ${CMAKE_DL_LIBS} +) + +set_property(TARGET j9jit APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/build/scripts/j9jit.linux.exp") +set_property(TARGET j9jit PROPERTY LINKER_LANGUAGE CXX) + +install( + TARGETS j9jit + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/tr.source/trj9/arm/CMakeLists.txt b/runtime/tr.source/trj9/arm/CMakeLists.txt new file mode 100644 index 00000000000..503f775b030 --- /dev/null +++ b/runtime/tr.source/trj9/arm/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Manage cross compilation here: +# +if(TR_HOST_ARCH STREQUAL "arm") + add_subdirectory(runtime) +endif() + +if(TR_TARGET_ARCH STREQUAL "arm") + add_subdirectory(codegen) +endif() + diff --git a/runtime/tr.source/trj9/codegen/CMakeLists.txt b/runtime/tr.source/trj9/codegen/CMakeLists.txt new file mode 100644 index 00000000000..662d29ae721 --- /dev/null +++ b/runtime/tr.source/trj9/codegen/CMakeLists.txt @@ -0,0 +1,34 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + codegen/CodeGenGC.cpp + codegen/CodeGenGPU.cpp + codegen/CodeGenRA.cpp + codegen/J9AheadOfTimeCompile.cpp + codegen/J9CodeGenerator.cpp + codegen/J9CodeGenPhase.cpp + codegen/J9GCStackAtlas.cpp + codegen/J9Instruction.cpp + codegen/J9Snippet.cpp + codegen/J9TreeEvaluator.cpp +) diff --git a/runtime/tr.source/trj9/compile/CMakeLists.txt b/runtime/tr.source/trj9/compile/CMakeLists.txt new file mode 100644 index 00000000000..d469e5ccc8d --- /dev/null +++ b/runtime/tr.source/trj9/compile/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + compile/J9AliasBuilder.cpp + compile/J9Compilation.cpp + compile/J9SymbolReferenceTable.cpp +) diff --git a/runtime/tr.source/trj9/control/CMakeLists.txt b/runtime/tr.source/trj9/control/CMakeLists.txt new file mode 100644 index 00000000000..55a7a239ec1 --- /dev/null +++ b/runtime/tr.source/trj9/control/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + control/CompilationController.cpp + control/CompilationThread.cpp + control/DLLMain.cpp + control/HookedByTheJit.cpp + control/J9Options.cpp + control/J9Recompilation.cpp + control/MethodToBeCompiled.cpp + control/rossa.cpp +) diff --git a/runtime/tr.source/trj9/env/CMakeLists.txt b/runtime/tr.source/trj9/env/CMakeLists.txt new file mode 100644 index 00000000000..4b8a7a518b9 --- /dev/null +++ b/runtime/tr.source/trj9/env/CMakeLists.txt @@ -0,0 +1,62 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + env/annotations/AnnotationBase.cpp + env/annotations/Annotations.cpp + env/annotations/GPUAnnotation.cpp + env/annotations/TestAnnotation.cpp + env/annotations/TRNoSideFXAnnotation.cpp + env/annotations/TROptAnnotation.cpp + env/annotations/VMJ9Annotations.cpp + env/CHTable.cpp + env/ClassLoaderTable.cpp + env/CpuUtilization.cpp + env/CryptoEnv.cpp + env/FilePointer.cpp + env/J2IThunk.cpp + env/J9ArithEnv.cpp + env/J9ClassEnv.cpp + env/J9CompilerEnv.cpp + env/J9CPU.cpp + env/J9DebugEnv.cpp + env/j9fieldsInfo.cpp + env/J9IO.cpp + env/J9JitMemory.cpp + env/J9KnownObjectTable.cpp + env/j9method.cpp + env/J9ObjectModel.cpp + env/J9SegmentAllocator.cpp + env/J9SegmentCache.cpp + env/J9SegmentProvider.cpp + env/J9SharedCache.cpp + env/J9VMEnv.cpp + env/J9VMMethodEnv.cpp + env/jitsupport.cpp + env/PersistentAllocator.cpp + env/PersistentCHTable.cpp + env/ProcessorDetection.cpp + env/Startup.cpp + env/SystemSegmentProvider.cpp + env/ut_j9jit.c + env/VMJ9.cpp +) diff --git a/runtime/tr.source/trj9/il/CMakeLists.txt b/runtime/tr.source/trj9/il/CMakeLists.txt new file mode 100644 index 00000000000..1887866fda5 --- /dev/null +++ b/runtime/tr.source/trj9/il/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + il/CryptoIl.cpp + il/J9DataTypes.cpp + il/J9IL.cpp + il/J9Node.cpp + il/J9SymbolReference.cpp + il/symbol/J9MethodSymbol.cpp + il/symbol/J9StaticSymbol.cpp + il/symbol/J9Symbol.cpp +) diff --git a/runtime/tr.source/trj9/ilgen/CMakeLists.txt b/runtime/tr.source/trj9/ilgen/CMakeLists.txt new file mode 100644 index 00000000000..345ab2721d4 --- /dev/null +++ b/runtime/tr.source/trj9/ilgen/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + ilgen/ClassLookahead.cpp + ilgen/IlGenerator.cpp + ilgen/J9ByteCodeIterator.cpp + ilgen/J9IlGeneratorMethodDetails.cpp + ilgen/Walker.cpp +) diff --git a/runtime/tr.source/trj9/infra/CMakeLists.txt b/runtime/tr.source/trj9/infra/CMakeLists.txt new file mode 100644 index 00000000000..e3fccac5473 --- /dev/null +++ b/runtime/tr.source/trj9/infra/CMakeLists.txt @@ -0,0 +1,28 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + infra/J9Cfg.cpp + infra/J9Monitor.cpp + infra/J9MonitorTable.cpp + infra/RWMonitor.cpp +) diff --git a/runtime/tr.source/trj9/optimizer/CMakeLists.txt b/runtime/tr.source/trj9/optimizer/CMakeLists.txt new file mode 100644 index 00000000000..85ee1692d41 --- /dev/null +++ b/runtime/tr.source/trj9/optimizer/CMakeLists.txt @@ -0,0 +1,69 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + optimizer/AllocationSinking.cpp + optimizer/CryptoOptimizer.cpp + optimizer/DataAccessAccelerator.cpp + optimizer/DynamicLiteralPool.cpp + optimizer/EscapeAnalysis.cpp + optimizer/EstimateCodeSize.cpp + optimizer/FearPointAnalysis.cpp + optimizer/HCRGuardAnalysis.cpp + optimizer/IdiomRecognition.cpp + optimizer/IdiomRecognitionUtils.cpp + optimizer/IdiomTransformations.cpp + optimizer/InlinerTempForJ9.cpp + optimizer/InterProceduralAnalyzer.cpp + optimizer/J9EstimateCodeSize.cpp + optimizer/J9Inliner.cpp + optimizer/J9LocalCSE.cpp + optimizer/J9Optimization.cpp + optimizer/J9OptimizationManager.cpp + optimizer/J9Optimizer.cpp + optimizer/J9Simplifier.cpp + optimizer/J9SimplifierHandlers.cpp + optimizer/J9SimplifierHelpers.cpp + optimizer/J9TransformUtil.cpp + optimizer/J9ValuePropagation.cpp + optimizer/JitProfiler.cpp + optimizer/JProfiling.cpp + optimizer/LiveVariablesForGC.cpp + optimizer/LoopAliasRefiner.cpp + optimizer/MonitorElimination.cpp + optimizer/NewInitialization.cpp + optimizer/OSRGuardAnalysis.cpp + optimizer/OSRGuardInsertion.cpp + optimizer/OSRGuardRemoval.cpp + optimizer/ProfileGenerator.cpp + optimizer/RedundantBCDSignElimination.cpp + optimizer/SequentialStoreSimplifier.cpp + optimizer/SignExtendLoads.cpp + optimizer/SPMDParallelizer.cpp + optimizer/SPMDPreCheck.cpp + optimizer/StringBuilderTransformer.cpp + optimizer/StringPeepholes.cpp + optimizer/SwitchAnalyzer.cpp + optimizer/UnsafeFastPath.cpp + optimizer/VarHandleTransformer.cpp + optimizer/VPBCDConstraint.cpp +) diff --git a/runtime/tr.source/trj9/p/CMakeLists.txt b/runtime/tr.source/trj9/p/CMakeLists.txt new file mode 100644 index 00000000000..b4919db2529 --- /dev/null +++ b/runtime/tr.source/trj9/p/CMakeLists.txt @@ -0,0 +1,33 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Manage cross compilation here: +# +if(TR_HOST_ARCH STREQUAL "p") + add_subdirectory(runtime) +endif() + +if(TR_TARGET_ARCH STREQUAL "p") + add_subdirectory(codegen) +endif() + +add_subdirectory(env) diff --git a/runtime/tr.source/trj9/p/codegen/CMakeLists.txt b/runtime/tr.source/trj9/p/codegen/CMakeLists.txt new file mode 100644 index 00000000000..effec837cdc --- /dev/null +++ b/runtime/tr.source/trj9/p/codegen/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + p/codegen/J9UnresolvedDataSnippet.cpp + p/codegen/J9CodeGenerator.cpp + p/codegen/CryptoCodeGenerator.cpp + p/codegen/J9TreeEvaluator.cpp + p/codegen/CryptoEvaluator.cpp + p/codegen/GenerateInstructions.cpp + p/codegen/J9PPCSnippet.cpp + p/codegen/J9AheadOfTimeCompile.cpp + p/codegen/PPCPrivateLinkage.cpp + p/codegen/PPCJNILinkage.cpp + p/codegen/InterfaceCastSnippet.cpp + p/codegen/CallSnippet.cpp + p/codegen/StackCheckFailureSnippet.cpp + p/codegen/DFPTreeEvaluator.cpp + p/codegen/J9PPCInstruction.cpp + p/codegen/ForceRecompilationSnippet.cpp + p/codegen/PPCRecompilation.cpp + p/codegen/PPCRecompilationSnippet.cpp + p/codegen/Trampoline.cpp + ${OMR_ROOT}/compiler/p/env/OMRDebugEnv.cpp +) diff --git a/runtime/tr.source/trj9/p/env/CMakeLists.txt b/runtime/tr.source/trj9/p/env/CMakeLists.txt new file mode 100644 index 00000000000..3c5ab43eb38 --- /dev/null +++ b/runtime/tr.source/trj9/p/env/CMakeLists.txt @@ -0,0 +1,25 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + p/env/J9CPU.cpp +) diff --git a/runtime/tr.source/trj9/p/runtime/CMakeLists.txt b/runtime/tr.source/trj9/p/runtime/CMakeLists.txt new file mode 100644 index 00000000000..bdac95ea6fb --- /dev/null +++ b/runtime/tr.source/trj9/p/runtime/CMakeLists.txt @@ -0,0 +1,70 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +if(OMR_HOST_OS STREQUAL "aix") + set(PPC_HW_PROFILER PPCHWProfilerAIX.cpp) + set(PPC_LM_GUARDED_STORAGE PPCLMGuardedStorageAIX.cpp) +# +# ifeq ($(I5_VERSION),I5_V6R1) +# PPC_HW_PROFILER= +# PPC_LM_GUARDED_STORAGE= +# endif +# ifeq ($(I5_VERSION),I5_V7R2) +# PPC_HW_PROFILER= +# PPC_LM_GUARDED_STORAGE= +# endif +endif() + +if(OMR_HOST_OS STREQUAL "linux") + set(PPC_HW_PROFILER PPCHWProfilerLinux.cpp) + set(PPC_LM_GUARDED_STORAGE PPCLMGuardedStorageLinux.cpp) +endif() + + +j9jit_files( + p/runtime/${PPC_HW_PROFILER} + p/runtime/${PPC_LM_GUARDED_STORAGE} + ${OMR_ROOT}/compiler/p/runtime/VirtualGuardRuntime.spp + ${OMR_ROOT}/compiler/p/runtime/OMRCodeCacheConfig.cpp + p/runtime/J9PPCArrayCopy.spp + p/runtime/J9PPCArrayCmp.spp + p/runtime/J9PPCArrayTranslate.spp + p/runtime/J9PPCEncodeUTF16.spp + p/runtime/J9PPCCompressString.spp + p/runtime/J9PPCCRC32.spp + p/runtime/J9PPCCRC32_wrapper.c + p/runtime/CodeSync.cpp + p/runtime/Math.spp + p/runtime/PicBuilder.spp + p/runtime/PPCRelocationTarget.cpp + p/runtime/J9PPCCrypto.spp + p/runtime/J9PPCSHA.spp + p/runtime/J9PPCEC.spp + p/runtime/Recomp.cpp + p/runtime/Recompilation.spp + p/runtime/PPCHWProfiler.cpp + p/runtime/PPCLMGuardedStorage.cpp + p/runtime/ebb.spp + p/runtime/Emulation.c +) + + diff --git a/runtime/tr.source/trj9/ras/CMakeLists.txt b/runtime/tr.source/trj9/ras/CMakeLists.txt new file mode 100644 index 00000000000..a53b4cbde46 --- /dev/null +++ b/runtime/tr.source/trj9/ras/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + ras/DebugExt.cpp + ras/DebugExtSegmentProvider.cpp + ras/HashTable.cpp + ras/InternalFunctions.cpp + ras/kca_offsets_generator.cpp +) diff --git a/runtime/tr.source/trj9/runtime/CMakeLists.txt b/runtime/tr.source/trj9/runtime/CMakeLists.txt new file mode 100644 index 00000000000..31e903aac34 --- /dev/null +++ b/runtime/tr.source/trj9/runtime/CMakeLists.txt @@ -0,0 +1,63 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + runtime/ArtifactManager.cpp + runtime/ClassUnloadAssumption.cpp + runtime/codertinit.cpp + runtime/CRuntimeImpl.cpp + runtime/Crypto.cpp + runtime/DataCache.cpp + runtime/emfloat.c + runtime/GPUHelpers.cpp + runtime/HookHelpers.cpp + runtime/HWProfiler.cpp + runtime/IProfiler.cpp + runtime/J9CodeCache.cpp + runtime/J9CodeCacheManager.cpp + runtime/J9CodeCacheMemorySegment.cpp + runtime/J9JitPersistentMemory.cpp + runtime/J9Profiler.cpp + runtime/JitRuntime.cpp + runtime/LMGuardedStorage.cpp + runtime/MetaData.cpp + runtime/MetaDataDebug.cpp + runtime/MethodMetaData.c + runtime/RelocationRecord.cpp + runtime/RelocationRuntime.cpp + runtime/RelocationRuntimeLogger.cpp + runtime/RelocationTarget.cpp + runtime/RelocationTarget.cpp + runtime/RuntimeAssumptions.cpp + runtime/Runtime.cpp + runtime/SignalHandler.c + runtime/Trampoline.cpp + runtime/ValueProfiler.cpp +) + +# These files are added from OMR, because they're not part +# of the default list provided by create_omr_compiler_library +j9jit_files( + ${OMR_ROOT}/compiler/runtime/OMRRuntimeAssumptions.cpp +) + + diff --git a/runtime/tr.source/trj9/x/CMakeLists.txt b/runtime/tr.source/trj9/x/CMakeLists.txt new file mode 100644 index 00000000000..2915493d470 --- /dev/null +++ b/runtime/tr.source/trj9/x/CMakeLists.txt @@ -0,0 +1,35 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +if(TR_HOST_ARCH STREQUAL "x") + add_subdirectory(runtime) +endif() + +if(TR_TARGET_ARCH STREQUAL "x") + add_subdirectory(codegen) +endif() + +if(TR_HOST_BITS STREQUAL 64) + add_subdirectory(amd64) +else() + add_subdirectory(i386) +endif() diff --git a/runtime/tr.source/trj9/x/amd64/CMakeLists.txt b/runtime/tr.source/trj9/x/amd64/CMakeLists.txt new file mode 100644 index 00000000000..a8220379d9a --- /dev/null +++ b/runtime/tr.source/trj9/x/amd64/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +if(TR_HOST_ARCH STREQUAL "x") + add_subdirectory(runtime) +endif() + + +if(TR_TARGET_BITS STREQUAL 64) + add_subdirectory(codegen) +endif() diff --git a/runtime/tr.source/trj9/x/amd64/codegen/CMakeLists.txt b/runtime/tr.source/trj9/x/amd64/codegen/CMakeLists.txt new file mode 100644 index 00000000000..4c070649527 --- /dev/null +++ b/runtime/tr.source/trj9/x/amd64/codegen/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + x/amd64/codegen/AMD64GuardedDevirtualSnippet.cpp + x/amd64/codegen/AMD64J9SystemLinkage.cpp + x/amd64/codegen/AMD64JNILinkage.cpp + x/amd64/codegen/AMD64PrivateLinkage.cpp + x/amd64/codegen/J9CodeGenerator.cpp +) diff --git a/runtime/tr.source/trj9/x/amd64/runtime/CMakeLists.txt b/runtime/tr.source/trj9/x/amd64/runtime/CMakeLists.txt new file mode 100644 index 00000000000..486c830ef2e --- /dev/null +++ b/runtime/tr.source/trj9/x/amd64/runtime/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + x/amd64/runtime/AMD64ArrayCopy.asm + x/amd64/runtime/AMD64ArrayTranslate.asm + x/amd64/runtime/AMD64CompressString.asm + x/amd64/runtime/AMD64cpuid.asm + x/amd64/runtime/AMD64Recompilation.asm +) diff --git a/runtime/tr.source/trj9/x/codegen/CMakeLists.txt b/runtime/tr.source/trj9/x/codegen/CMakeLists.txt new file mode 100644 index 00000000000..6e2cc778e92 --- /dev/null +++ b/runtime/tr.source/trj9/x/codegen/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + x/codegen/AllocPrefetchSnippet.cpp + x/codegen/CallSnippet.cpp + x/codegen/CheckFailureSnippet.cpp + x/codegen/CryptoEvaluator.cpp + x/codegen/ForceRecompilationSnippet.cpp + x/codegen/GuardedDevirtualSnippet.cpp + x/codegen/J9AheadOfTimeCompile.cpp + x/codegen/J9CodeGenerator.cpp + x/codegen/J9Linkage.cpp + x/codegen/J9LinkageUtils.cpp + x/codegen/J9Snippet.cpp + x/codegen/J9TreeEvaluator.cpp + x/codegen/J9UnresolvedDataSnippet.cpp + x/codegen/J9X86Instruction.cpp + x/codegen/JNIPauseSnippet.cpp + x/codegen/PassJNINullSnippet.cpp + x/codegen/RecompilationSnippet.cpp + x/codegen/ScratchArgHelperCallSnippet.cpp + x/codegen/WriteBarrierSnippet.cpp + x/codegen/X86HelperLinkage.cpp + x/codegen/X86PrivateLinkage.cpp + x/codegen/X86Recompilation.cpp + x/env/J9CPU.cpp +) diff --git a/runtime/tr.source/trj9/x/i386/CMakeLists.txt b/runtime/tr.source/trj9/x/i386/CMakeLists.txt new file mode 100644 index 00000000000..37f86aea75b --- /dev/null +++ b/runtime/tr.source/trj9/x/i386/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +if(TR_HOST_ARCH STREQUAL "x") + add_subdirectory(runtime) +endif() + + +if(NOT TR_TARGET_BITS STREQUAL 64) + add_subdirectory(codegen) +endif() diff --git a/runtime/tr.source/trj9/x/i386/codegen/CMakeLists.txt b/runtime/tr.source/trj9/x/i386/codegen/CMakeLists.txt new file mode 100644 index 00000000000..04f22fd6d60 --- /dev/null +++ b/runtime/tr.source/trj9/x/i386/codegen/CMakeLists.txt @@ -0,0 +1,28 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + x/i386/codegen/IA32J9SystemLinkage.cpp + x/i386/codegen/IA32JNILinkage.cpp + x/i386/codegen/IA32PrivateLinkage.cpp + x/i386/codegen/J9CodeGenerator.cpp +) diff --git a/runtime/tr.source/trj9/x/i386/runtime/CMakeLists.txt b/runtime/tr.source/trj9/x/i386/runtime/CMakeLists.txt new file mode 100644 index 00000000000..443d3f23db3 --- /dev/null +++ b/runtime/tr.source/trj9/x/i386/runtime/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + x/i386/runtime/IA32cpuid.asm + x/i386/runtime/IA32Recompilation.asm + x/i386/runtime/J9IA32ArrayCopy.asm + x/i386/runtime/J9IA32ArrayTranslate.asm + x/i386/runtime/J9IA32CompressString.asm + x/i386/runtime/J9IA32Math64.asm +) diff --git a/runtime/tr.source/trj9/x/runtime/CMakeLists.txt b/runtime/tr.source/trj9/x/runtime/CMakeLists.txt new file mode 100644 index 00000000000..ffc37a4cb7c --- /dev/null +++ b/runtime/tr.source/trj9/x/runtime/CMakeLists.txt @@ -0,0 +1,37 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +j9jit_files( + ${OMR_ROOT}/compiler/x/runtime/VirtualGuardRuntime.cpp + x/runtime/IA32sse.c + x/runtime/Recomp.cpp + x/runtime/X86ArrayTranslate.asm + x/runtime/X86Codert.asm + x/runtime/X86CPUID.asm + x/runtime/X86Crypto.asm + x/runtime/X86EncodeUTF16.asm + x/runtime/X86LockReservation.asm + x/runtime/X86PicBuilderC.cpp + x/runtime/X86PicBuilder.pasm + x/runtime/X86RelocationTarget.cpp + x/runtime/X86Unresolveds.pasm +) diff --git a/runtime/tr.source/trj9/z/CMakeLists.txt b/runtime/tr.source/trj9/z/CMakeLists.txt new file mode 100644 index 00000000000..0ecffaac204 --- /dev/null +++ b/runtime/tr.source/trj9/z/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +# Manage cross compilation here: +# +if(TR_HOST_ARCH STREQUAL "z") + add_subdirectory(runtime) +endif() + +if(TR_TARGET_ARCH STREQUAL "z") + add_subdirectory(codegen) +endif() + diff --git a/runtime/util/CMakeLists.txt b/runtime/util/CMakeLists.txt new file mode 100644 index 00000000000..ef6ca3189ac --- /dev/null +++ b/runtime/util/CMakeLists.txt @@ -0,0 +1,168 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(hshelp.tdf j9hshelp) +add_tracegen(util.tdf j9util) +add_tracegen(vmutil.tdf j9vmutil) +add_tracegen(module.tdf) +add_tracegen(srphashtable.tdf) + + +add_custom_command( + OUTPUT fpusup.s + DEPENDS fpusup.m4 run_constgen + COMMAND m4 -I${CMAKE_CURRENT_SOURCE_DIR}/../oti ${CMAKE_CURRENT_SOURCE_DIR}/fpusup.m4 > fpusup.s +) +add_library(j9util STATIC + alignedmemcpy.c + annhelp.c + argbits.c + argcount.c + bcdump.c + bcnames.c + bcsizes.c + binarysup.c + checkcast.cpp + cphelp.c + cpplink.c + defarg.c + divhelp.c + divrem.c + eventframe.c + extendedHCR.c + extendedmethodblockaccess.c + fieldutil.c + filecache.c + final.c + fltconv.c + fltdmath.c + fltmath.c + fltodd.c + fltrem.c + genericSignalHandler.c + hshelp.c + j9crc32.c + j9fptr.c + j9list.c + jbcmap.c + jitfloat.c + jitlook.c + jitregs.c + jitresolveframe.c + jlm.c + jnierrhelp.c + jniprotect.c + #mingw_comp.c + modularityHelper.c + moninfo.c + mthutil.c + ObjectHash.cpp + optinfo.c + pcstack.c + pkgname.c + propsfile.c + rcdump.c + resolvehelp.c + returntype.c + romclasswalk.c + romhelp.c + sendslot.c + shchelp_j9.c + sleephelp.c + srphashtable.c + strhelp.c + subclass.c + sunbcrel.c + superclass.c + thrhelp.c + thrinfo.c + thrname.c + tracehelp.c + utf8hash.c + vmargs.c + vmihelp.c + vmstate.c + VMThreadFlags.cpp + vrfytbl.c + #waithelp.c + wildcard.c + + ut_j9hshelp.c + ut_j9util.c + ut_j9vmutil.c + ut_module.c + ut_srphashtable.c + + openj9_version.c + #TODO crappy hard coded platform stuff + linux/osinfo.c +) +j9vm_optional_compile(j9util + PRIVATE + offload.c +) + + +if(OMR_ARCH_X86) + target_sources(j9util + PRIVATE + fpusup.s + ) +endif() + +target_include_directories(j9util + PUBLIC + ${CMAKE_CURRENT_BINARY_DIR} + . +) + +target_link_libraries(j9util + PRIVATE + j9vm_interface + j9vm_nls + j9vm_gc_includes + + j9simplepool +) + +add_library(j9util_b156 STATIC + modularityHelper.c + hshelp.c + superclass.c + fieldutil.c + tracehelp.c + propsfile.c + #openlibrary.c + vmihelp.c + vmargs.c + ut_j9util.c + ut_j9vmutil.c + ut_module.c +) + +target_link_libraries(j9util_b156 + PRIVATE + j9vm_interface + j9vm_gc_includes +) + +target_compile_definitions(j9util_b156 PRIVATE -DJ9VM_JAVA9_BUILD=156) diff --git a/runtime/util_core/CMakeLists.txt b/runtime/util_core/CMakeLists.txt new file mode 100644 index 00000000000..2a22746a6dc --- /dev/null +++ b/runtime/util_core/CMakeLists.txt @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9utilcore STATIC + j9argscan.c + j9shchelp.c + vmargs_core.c + #TODO this is incredibly dumb + ../gc_glue_java/UtilGlue.c + $ + +) + +target_include_directories(j9utilcore + PRIVATE + ../omr/include_core + ../nls +) + +target_link_libraries(j9utilcore + PRIVATE + j9vm_interface +) diff --git a/runtime/verbose/CMakeLists.txt b/runtime/verbose/CMakeLists.txt new file mode 100644 index 00000000000..8f120ea08cc --- /dev/null +++ b/runtime/verbose/CMakeLists.txt @@ -0,0 +1,116 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9vrb.tdf) + +add_library(j9vrb SHARED + errormessage_internal.c + errormessagebuffer.c + errormessageframeworkcfr.c + errormessageframeworkrtv.c + errormessagehelper.c + verbose.c + + ../vm/swalk.c + ../vm/linearswalk.c + + ../codert_vm/jswalk.c #IF J9VM_INTERP_NATIVE_SUPPORT + ../tr.source/trj9/runtime/MethodMetaData.c #IF J9VM_INTERP_NATIVE_SUPPORT + ../jit_vm/ctsupport.c #IF J9VM_INTERP_USE_SPLIT_SIDE_TABLES + + ut_j9vrb.c +) + +#TODO this is platform specific +set_property(SOURCE ../tr.source/trj9/runtime/MethodMetaData.c APPEND_STRING PROPERTY COMPILE_FLAGS " -std=gnu89") +target_include_directories(j9vrb + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ../tr.source/runtime + ../tr.source/ibm/runtime + ../tr.source/codegen + ../tr.source/ibm/codegen + ../omr/compiler/codegen + ../omr/compiler + ../tr.source/base + ../tr.source/ibm/base + ../tr.source + ../tr.source/ibm + ../tr.source/trj9/runtime + ../tr.source/trj9 + ../shared_common/include +) + +target_link_libraries(j9vrb + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_compiler_defines + + omrgc + j9shr + j9trc + j9stackmap + j9util + j9utilcore + j9verutil + j9avl + j9hashtable + j9pool + j9thr + j9gcbase + j9gcstructs + j9gcstats + j9gcapi + j9modronstartup + j9gcvrbjava + j9gcvrbold + j9gcvrbevents + j9modronstandard + j9realtime + j9gcvlhgc + j9gcvrbhdlrstandardjava + j9gcvrbhdlrrealtime + j9gcvrbhdlrvlhgc + j9hookable + j9zip + + j9utilcore + j9vm + j9codert_vm + j9modronstandard + j9gc +) + + + +target_compile_definitions(j9vrb + PRIVATE + -DJ9VM_INTERP_STACKWALK_TRACING + -DJ9VM_INTERP_LINEAR_STACKWALK_TRACING +) + +install( + TARGETS j9vrb + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/verutil/CMakeLists.txt b/runtime/verutil/CMakeLists.txt new file mode 100644 index 00000000000..177ea0d9cef --- /dev/null +++ b/runtime/verutil/CMakeLists.txt @@ -0,0 +1,38 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9verutil STATIC + cfrerr.c + chverify.c + sigverify.c +) +target_include_directories(j9verutil + PRIVATE + ../omr/include_core + ../nls +) +target_link_libraries(j9verutil + PRIVATE + j9vm_interface +) + +add_dependencies(j9verutil j9vm_hookgen) diff --git a/runtime/vm/CMakeLists.txt b/runtime/vm/CMakeLists.txt new file mode 100644 index 00000000000..50d73d9a7e2 --- /dev/null +++ b/runtime/vm/CMakeLists.txt @@ -0,0 +1,239 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9vm.tdf) +set(use_alternate_compiler FALSE) +if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)) + set(use_alternate_compiler TRUE) + enable_language(J9VM_C_ALT) + set(CMAKE_J9VM_C_ALT_FLAGS "${CMAKE_CXX_FLAGS} -fpic") +endif() + +add_library(j9vm_tracegen OBJECT ut_j9vm.c) +target_include_directories(j9vm_tracegen + PRIVATE + $ +) + +#TODO we shouldnt force fpic here + + + +function(j9vm_alt_compiler tgt) + target_sources(${tgt} PRIVATE ${ARGN}) + if(use_alternate_compiler) + set_source_files_properties(${ARGN} PROPERTIES LANGUAGE "J9VM_C_ALT") + endif() +endfunction(j9vm_alt_compiler) + +add_library(j9vm SHARED + annsup.c + AsyncMessageHandler.cpp + bchelper.c + bindnatv.cpp + #BytecodeInterpreter.cpp + callin.cpp + classallocation.c + ClassInitialization.cpp + classloadersearch.c + classseg.c + classsupport.c + createramclass.cpp + #DebugBytecodeInterpreter.cpp + description.c + dllsup.c + drophelp.c + exceptiondescribe.c + exceptionsupport.c + FastJNI_com_ibm_oti_vm_VM.cpp + FastJNI.cpp + FastJNI_java_lang_Class.cpp + FastJNI_java_lang_ClassLoader.cpp + FastJNI_java_lang_invoke_MethodHandle.cpp + FastJNI_java_lang_J9VMInternals.cpp + FastJNI_java_lang_Object.cpp + FastJNI_java_lang_reflect_Array.cpp + FastJNI_java_lang_ref_Reference.cpp + FastJNI_java_lang_String.cpp + FastJNI_java_lang_System.cpp + FastJNI_java_lang_Thread.cpp + FastJNI_java_lang_Throwable.cpp + FastJNI_sun_misc_Unsafe.cpp + findmethod.c + gphandle.c + growstack.cpp + guardedstorage.c + hookableAsync.c + hookhelp.c + initsendtarget.cpp + #Only on z/OS? + #inlineleconditionhandler.c + intfunc.c + J9OMRHelpers.cpp + javaPriority.c + jnicgen.c + jnicsup.cpp + jnifield.cpp + jniinv.c + jnimem.c + jnimisc.cpp + jnireflect.cpp + jvmfree.c + jvminit.c + jvminitcommon.c + jvmrisup.c + KeyHashTable.c + leconditionexceptionsup.c + linearswalk.c + lockwordconfig.c + logsupport.c + lookuphelper.c + lookupmethod.c + #MHInterpreter.cpp + ModularityHashTables.c + monhelpers.c + montable.c + NativeHelpers.cpp + ObjectFieldInfo.cpp + ObjectMonitor.cpp + OutOfLineINL_jdk_experimental_value_ValueType.cpp + OutOfLineINL_jdk_internal_misc_Unsafe.cpp + ownedmonitors.c + profilingbc.c + rasdump.c + rastrace.c + resolvefield.cpp + resolvesupport.cpp + romclasses.c + romutil.c + segment.c + StackDumper.c + statistics.c + stringhelpers.cpp + swalk.c + threadhelp.cpp + threadpark.c + visible.c + VMAccess.cpp + vmbootlib.c + vmhook.c + vmifunc.c + vmizip.c + vmphases.c + vmprops.c + vmruntimestate.c + vmthinit.c + vmthread.c + xcheck.c + + #TRACEGEN files + $ +) + +#hacks for M4 stuff +#TODO we should be detecting m4 properly +#also we probably need to fix up the path dir separators for windows +if(OMR_ARCH_X86) + add_custom_command( OUTPUT xcinterp.s + DEPENDS xcinterp.m4 run_constgen + COMMAND m4 -I ${CMAKE_CURRENT_SOURCE_DIR}/../oti ${CMAKE_CURRENT_SOURCE_DIR}/xcinterp.m4 > xcinterp.s + ) + add_custom_command(OUTPUT stackswap.s + DEPENDS xa64/stackswap.m4 run_constgen + COMMAND m4 -I ${CMAKE_CURRENT_SOURCE_DIR}/../oti ${CMAKE_CURRENT_SOURCE_DIR}/xa64/stackswap.m4 > stackswap.s + ) + target_sources(j9vm + PRIVATE + xa64/unsafeHelper.s + xcinterp.s + stackswap.s + ) +elseif(OMR_ARCH_POWER) #TODO check linux and 64bit + add_custom_command( OUTPUT pcinterp.s + DEPENDS pcinterp.m4 run_constgen + COMMAND m4 -I ${CMAKE_CURRENT_SOURCE_DIR}/../oti ${CMAKE_CURRENT_SOURCE_DIR}/pcinterp.m4 > pcinterp.s + ) + target_sources(j9vm + PRIVATE + xl64/unsafeHelper.s + pcinterp.s + ) +endif() + +target_include_directories(j9vm + PRIVATE + ../omr/include_core + ../omr/gc/include + ../gc_include + ../nls + ../util + ../gc_glue_java + ../shared_common/include + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(j9vm + PRIVATE + j9vm_interface + omrcore + j9verutil + j9thr + j9util + j9utilcore + j9avl + j9hashtable + j9pool + j9stackmap + j9trc + #j9fdlibm + j9hookable + #j9omr + j9prt + #omrsig + j9bcv + j9dyn + j9simplepool + j9zip + ffi + #j9jitbuilder + + #link hacks + j9util + j9simplepool + j9verutil + j9stackmap + j9bcv + j9dyn + j9util + j9thr +) + +j9vm_alt_compiler(j9vm + BytecodeInterpreter.cpp + DebugBytecodeInterpreter.cpp + MHInterpreter.cpp +) + +install( + TARGETS j9vm + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/vmchk/CMakeLists.txt b/runtime/vmchk/CMakeLists.txt new file mode 100644 index 00000000000..ef44ba0ecac --- /dev/null +++ b/runtime/vmchk/CMakeLists.txt @@ -0,0 +1,51 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_tracegen(j9vmchk.tdf) + +add_library(j9vmchk SHARED + checkclasses.c + checkclconstraints.c + checkinterntable.c + checkmethods.c + checkromclasses.c + checkthreads.c + vmcheck.c + + ut_j9vmchk.c +) + +target_link_libraries(j9vmchk + PRIVATE + j9vm_interface + j9vm_gc_includes + + j9thr + j9util + j9utilcore + j9hashtable +) + +install( + TARGETS j9vmchk + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +) diff --git a/runtime/zip/CMakeLists.txt b/runtime/zip/CMakeLists.txt new file mode 100644 index 00000000000..03b9f27ce86 --- /dev/null +++ b/runtime/zip/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9zip STATIC + zcpool.c + zipalloc.c + zipcache.c + zipsup.c +) +target_link_libraries(j9zip + PRIVATE + j9vm_interface + j9hookable + j9zlib +) +target_include_directories(j9zip + PRIVATE + ../omr/include_core +) + diff --git a/runtime/zlib/CMakeLists.txt b/runtime/zlib/CMakeLists.txt new file mode 100644 index 00000000000..81ad0fe789b --- /dev/null +++ b/runtime/zlib/CMakeLists.txt @@ -0,0 +1,51 @@ +################################################################################ +# Copyright (c) 2017, 2017 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +################################################################################ + +add_library(j9zlib SHARED + adler32.c + compress.c + crc32.c + deflate.c + infback.c + inffast.c + inflate.c + inftrees.c + #j9zlibexp.c + trees.c + uncompr.c + zutil.c + +) + +target_include_directories(j9zlib + PUBLIC + . +) + +target_link_libraries(j9zlib + PRIVATE + j9vm_interface +) +install( + TARGETS j9zlib + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} +)