# Copyright (c) 2023 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. import("//arkcompiler/ets_runtime/js_runtime_config.gni") import("//arkcompiler/ets_runtime/test/test_helper.gni") module_output_path = "ets_runtime" host_unittest_action("mapleallUT") { rtti_compile_flag = false configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ] module_out_path = module_output_path include_directories = [ "${MAPLEALL_ROOT}/maple_be/include/cg", "${MAPLEALL_ROOT}/maple_be/include/cg/aarch64", "${MAPLEALL_ROOT}/maple_be/include/cg/x86_64", "${MAPLEALL_ROOT}/maple_be/include/litecg", "${MAPLEALL_ROOT}/maple_be/include/ad", "${MAPLEALL_ROOT}/maple_be/include/be", "${MAPLEALL_ROOT}/maple_ir/include/", "${MAPLEALL_ROOT}/maple_util/include/", "${MAPLEALL_ROOT}/mempool/include/", "${MAPLEALL_ROOT}/maple_driver/include/", "${MAPLEALL_ROOT}/maple_me/include/", "${MAPLEALL_ROOT}/maple_phase/include/", "${MAPLEALL_ROOT}/mpl2mpl/include/", "${MAPLEALL_ROOT}/test/include/", "${MAPLEALL_THIRD_PARTY_ROOT}/", "${MAPLEALL_THIRD_PARTY_ROOT}/bounds_checking_function/include/", ] src_mapleallUT = [ "./maple_be/cg_aarch64_aarch64_abi_test.cpp", "./maple_be/cg_aarch64_aarch64_isa_test.cpp", "./maple_be/cg_aarch64_aarch64_operand_test.cpp", "./maple_be/cg_cg_irbuilder_test.cpp", "./maple_be/cg_cgbb_test.cpp", "./maple_be/cg_x86_64_x64_isa_test.cpp", "./maple_be/litecg_lmir_builder_test.cpp", "./maple_ir/intrinsics_test.cpp", "./maple_ir/mir_const_test.cpp", "./maple_ir/mir_nodes_test.cpp", "./maple_ir/mir_type_test.cpp", "./mempool/maple_string_test.cpp", "./mpl2mpl/constantfold_test.cpp", ] sources = src_mapleallUT include_dirs = include_directories deps_libcg = [ # Add Link Library "${MAPLEALL_ROOT}/mempool:libmempool", "${MAPLEALL_ROOT}/maple_phase:libmplphase", "${MAPLEALL_ROOT}/mpl2mpl:libmpl2mpl", "${MAPLEALL_ROOT}/maple_ir:libmplir", "${MAPLEALL_ROOT}/maple_util:libmplutil", "${MAPLEALL_ROOT}/maple_me:libmplme", "${MAPLEALL_ROOT}/maple_be:libcg", ] deps = [] # If dynamic cast is used in the source code, set COMPILE_RTTI_ to true rtti_compile_flag = true deps += deps_libcg libs = [ "pthread" ] } group("host_unittest") { testonly = true # deps file deps = [ ":mapleallUTAction" ] if (is_mac) { deps -= [ ":mapleallUTAction" ] } }