# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. project(aotdump) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVIXL_INCLUDE_SIMULATOR_AARCH64") set(GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated) file(MAKE_DIRECTORY ${GENERATED_DIR}) set(AOTDUMP_OPTIONS_H ${GENERATED_DIR}/aotdump_options.h) panda_gen_file( DATAFILE ${CMAKE_CURRENT_LIST_DIR}/aotdump.yaml TEMPLATE ${PANDA_ROOT}/templates/options/options.h.erb OUTPUTFILE ${AOTDUMP_OPTIONS_H} REQUIRES ${PANDA_ROOT}/templates/common.rb ) add_custom_target(aotdump_options DEPENDS ${AOTDUMP_OPTIONS_H}) panda_add_executable(ark_aotdump aotdump.cpp ) target_compile_options(ark_aotdump PUBLIC "-Wno-attributes") panda_add_to_clang_tidy(ark_aotdump) add_dependencies(ark_aotdump aotdump_options) target_link_libraries(ark_aotdump arkbase arkruntime arkaotmanager) if (PANDA_TARGET_AMD64) add_dependencies(ark_aotdump Zydis) target_link_libraries(ark_aotdump Zydis) endif() target_include_directories(ark_aotdump PUBLIC ${GENERATED_DIR} PUBLIC ${PANDA_ROOT}/compiler/aot PUBLIC ${PANDA_ROOT}/runtime ) panda_add_sanitizers(TARGET ark_aotdump SANITIZERS ${PANDA_SANITIZERS_LIST}) add_check_style(".")