• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//arkcompiler/ets_runtime/js_runtime_config.gni")
15import("//arkcompiler/ets_runtime/test/test_helper.gni")
16
17module_output_path = "ets_runtime"
18
19host_unittest_action("mapleallUT") {
20  rtti_compile_flag = false
21  configs = [ "${MAPLEALL_ROOT}:mapleallcompilecfg" ]
22  module_out_path = module_output_path
23  include_directories = [
24    "${MAPLEALL_ROOT}/maple_be/include/cg",
25    "${MAPLEALL_ROOT}/maple_be/include/cg/aarch64",
26    "${MAPLEALL_ROOT}/maple_be/include/cg/x86_64",
27    "${MAPLEALL_ROOT}/maple_be/include/litecg",
28    "${MAPLEALL_ROOT}/maple_be/include/ad",
29    "${MAPLEALL_ROOT}/maple_be/include/be",
30    "${MAPLEALL_ROOT}/maple_ir/include/",
31    "${MAPLEALL_ROOT}/maple_util/include/",
32    "${MAPLEALL_ROOT}/mempool/include/",
33    "${MAPLEALL_ROOT}/maple_driver/include/",
34    "${MAPLEALL_ROOT}/maple_me/include/",
35    "${MAPLEALL_ROOT}/maple_phase/include/",
36    "${MAPLEALL_ROOT}/mpl2mpl/include/",
37    "${MAPLEALL_ROOT}/test/include/",
38    "${MAPLEALL_THIRD_PARTY_ROOT}/",
39    "${MAPLEALL_THIRD_PARTY_ROOT}/bounds_checking_function/include/",
40  ]
41  src_mapleallUT = [
42    "./maple_be/cg_aarch64_aarch64_abi_test.cpp",
43    "./maple_be/cg_aarch64_aarch64_isa_test.cpp",
44    "./maple_be/cg_aarch64_aarch64_operand_test.cpp",
45    "./maple_be/cg_cg_irbuilder_test.cpp",
46    "./maple_be/cg_cgbb_test.cpp",
47    "./maple_be/cg_x86_64_x64_isa_test.cpp",
48    "./maple_be/litecg_lmir_builder_test.cpp",
49    "./maple_ir/intrinsics_test.cpp",
50    "./maple_ir/mir_const_test.cpp",
51    "./maple_ir/mir_nodes_test.cpp",
52    "./maple_ir/mir_type_test.cpp",
53    "./mempool/maple_string_test.cpp",
54    "./mpl2mpl/constantfold_test.cpp",
55  ]
56  sources = src_mapleallUT
57  include_dirs = include_directories
58  deps_libcg = [  # Add Link Library
59    "${MAPLEALL_ROOT}/mempool:libmempool",
60    "${MAPLEALL_ROOT}/maple_phase:libmplphase",
61    "${MAPLEALL_ROOT}/mpl2mpl:libmpl2mpl",
62    "${MAPLEALL_ROOT}/maple_ir:libmplir",
63    "${MAPLEALL_ROOT}/maple_util:libmplutil",
64    "${MAPLEALL_ROOT}/maple_me:libmplme",
65    "${MAPLEALL_ROOT}/maple_be:libcg",
66  ]
67
68  deps = []
69
70  # If dynamic cast is used in the source code, set COMPILE_RTTI_ to true
71  rtti_compile_flag = true
72  deps += deps_libcg
73  libs = [ "pthread" ]
74}
75group("host_unittest") {
76  testonly = true
77
78  # deps file
79  deps = [ ":mapleallUTAction" ]
80
81  if (is_mac) {
82    deps -= [ ":mapleallUTAction" ]
83  }
84}
85