Path: blob/master/runtime/codert_vm/CMakeLists.txt
5986 views
################################################################################1# Copyright (c) 2017, 2021 IBM Corp. and others2#3# This program and the accompanying materials are made available under4# the terms of the Eclipse Public License 2.0 which accompanies this5# distribution and is available at https://www.eclipse.org/legal/epl-2.0/6# or the Apache License, Version 2.0 which accompanies this distribution and7# is available at https://www.apache.org/licenses/LICENSE-2.0.8#9# This Source Code may also be made available under the following10# Secondary Licenses when the conditions for such availability set11# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12# General Public License, version 2 with the GNU Classpath13# Exception [1] and GNU General Public License, version 2 with the14# OpenJDK Assembly Exception [2].15#16# [1] https://www.gnu.org/software/classpath/license.html17# [2] http://openjdk.java.net/legal/assembly-exception.html18#19# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20################################################################################2122set(OMR_ENHANCED_WARNINGS OFF)2324add_tracegen(j9codertvm.tdf)25j9vm_add_library(j9codert_vm STATIC26cache.c27cnathelp.cpp28CodertVMHelpers.cpp29decomp.cpp30dlt.c31fsdcsup.c32jitavl.c33jithash.cpp34jswalk.c35thunkcrt.c3637${CMAKE_CURRENT_BINARY_DIR}/ut_j9codertvm.c38)3940target_include_directories(j9codert_vm41PRIVATE42.43${CMAKE_CURRENT_BINARY_DIR}44${j9vm_SOURCE_DIR}/gc_include45${omr_SOURCE_DIR}/gc/include46${j9vm_SOURCE_DIR}/compiler/runtime/47)4849if(OMR_ARCH_X86)50j9vm_gen_asm(xnathelp.m4)5152target_sources(j9codert_vm PRIVATE53xnathelp.s54)55elseif(OMR_ARCH_POWER)56j9vm_gen_asm(pnathelp.m4)5758target_sources(j9codert_vm PRIVATE59pnathelp.s60)61elseif(OMR_ARCH_S390)62set(m4_defines )63if(OMR_OS_ZOS)64if(OMR_ENV_DATA64)65list(APPEND m4_defines TR_64Bit TR_HOST_64BIT)66endif()67# NOTE: no flags needed for 31 bit686970if(J9VM_JIT_FREE_SYSTEM_STACK_POINTER)71list(APPEND m4_defines J9VM_JIT_FREE_SYSTEM_STACK_POINTER)72endif()73endif()74j9vm_gen_asm(znathelp.m4 DEFINES ${m4_defines})7576target_sources(j9codert_vm PRIVATE77znathelp.s78)79elseif(OMR_ARCH_ARM)80j9vm_gen_asm(armnathelp.m4)81target_sources(j9codert_vm PRIVATE82armnathelp.s83)84elseif(OMR_ARCH_AARCH64)85j9vm_gen_asm(arm64nathelp.m4)86target_sources(j9codert_vm PRIVATE87arm64nathelp.s88)89elseif(OMR_ARCH_RISCV)90j9vm_gen_asm(riscvnathelp.m4)91target_sources(j9codert_vm PRIVATE92riscvnathelp.s93)94else()95message(SEND_ERROR "Unsupported platform")96endif()979899if(J9VM_JIT_RUNTIME_INSTRUMENTATION)100target_sources(j9codert_vm PRIVATE runtimeInstrumentation.c)101endif()102103target_link_libraries(j9codert_vm104PRIVATE105j9vm_interface106j9vm_compiler_defines107)108109110