• 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  ]
39  src_mapleallUT = [
40    "./maple_be/cg_aarch64_aarch64_abi_test.cpp",
41    "./maple_be/cg_aarch64_aarch64_isa_test.cpp",
42    "./maple_be/cg_aarch64_aarch64_operand_test.cpp",
43    "./maple_be/cg_cg_irbuilder_test.cpp",
44    "./maple_be/cg_cgbb_test.cpp",
45    "./maple_be/cg_x86_64_x64_isa_test.cpp",
46    "./maple_be/litecg_lmir_builder_test.cpp",
47    "./maple_ir/intrinsics_test.cpp",
48    "./maple_ir/mir_const_test.cpp",
49    "./maple_ir/mir_nodes_test.cpp",
50    "./maple_ir/mir_type_test.cpp",
51    "./mempool/maple_string_test.cpp",
52    "./mpl2mpl/constantfold_test.cpp",
53  ]
54  sources = src_mapleallUT
55  include_dirs = include_directories
56  deps_libcg = [  # Add Link Library
57    "${MAPLEALL_ROOT}/mempool:libmempool",
58    "${MAPLEALL_ROOT}/maple_phase:libmplphase",
59    "${MAPLEALL_ROOT}/mpl2mpl:libmpl2mpl",
60    "${MAPLEALL_ROOT}/maple_ir:libmplir",
61    "${MAPLEALL_ROOT}/maple_util:libmplutil",
62    "${MAPLEALL_ROOT}/maple_me:libmplme",
63    "${MAPLEALL_ROOT}/maple_be:libcg",
64  ]
65
66  deps = []
67
68  # If dynamic cast is used in the source code, set COMPILE_RTTI_ to true
69  rtti_compile_flag = true
70  deps += deps_libcg
71  external_deps = [ "bounds_checking_function:libsec_shared" ]
72  libs = [ "pthread" ]
73}
74group("host_unittest") {
75  testonly = true
76
77  # deps file
78  deps = [ ":mapleallUTAction" ]
79
80  if (is_mac) {
81    deps -= [ ":mapleallUTAction" ]
82  }
83}
84