• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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("../../../test/compiler_service_test.gni")
15import("//arkcompiler/ets_runtime/js_runtime_config.gni")
16
17config("module_private_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "${compiler_service_root}/include",
21    "${compiler_service_root}/interface",
22  ]
23  cflags = [
24    "-Wno-error=keyword-macro",
25    "-Wno-nested-anon-types",
26    "-Wno-gnu-anonymous-struct",
27    "-Wno-variadic-macros",
28  ]
29}
30
31ohos_unittest("AotCompilerArgsHandlerUnitTest") {
32  module_out_path = module_output_path
33  configs = [
34    ":module_private_config",
35    "$js_root:ark_jsruntime_public_config",
36  ]
37  version_script = "${compiler_service_root}/libaot_compiler_service.map"
38  sources = [
39    "${js_root}/common_components/log/log.cpp",
40    "${compiler_service_root}/interface/aot_compiler_interface_proxy.cpp",
41    "${compiler_service_root}/interface/aot_compiler_interface_stub.cpp",
42    "${compiler_service_root}/src/aot_args_handler.cpp",
43    "${compiler_service_root}/src/aot_compiler_client.cpp",
44    "${compiler_service_root}/src/aot_compiler_error_utils.cpp",
45    "${compiler_service_root}/src/aot_compiler_impl.cpp",
46    "${compiler_service_root}/src/aot_compiler_load_callback.cpp",
47    "${compiler_service_root}/src/aot_compiler_service.cpp",
48    "${compiler_service_root}/src/power_disconnected_listener.cpp",
49    "${compiler_service_root}/src/screen_status_listener.cpp",
50    "${compiler_service_root}/src/thermal_mgr_listener.cpp",
51  ]
52  if (is_mingw) {
53    sources += [
54      "${js_root}/ecmascript/platform/windows/file.cpp",
55    ]
56  } else {
57    sources += [
58      "${js_root}/ecmascript/platform/unix/file.cpp",
59    ]
60  }
61  deps = [
62    "${compiler_service_root}:libcompiler_service",
63  ]
64  external_deps = [
65    "ability_base:want",
66    "access_token:libaccesstoken_sdk",
67    "access_token:libtokenid_sdk",
68    "c_utils:utils",
69    "common_event_service:cesfwk_innerkits",
70    "eventhandler:libeventhandler",
71    "googletest:gmock_main",
72    "googletest:gtest_main",
73    "hilog:libhilog",
74    "hisysevent:libhisysevent",
75    "hitrace:hitrace_meter",
76    "icu:shared_icui18n",
77    "icu:shared_icuuc",
78    "ipc:ipc_core",
79    "runtime_core:libarkfile_static",
80    "safwk:system_ability_fwk",
81    "samgr:samgr_proxy",
82  ]
83  defines = []
84  if (code_sign_enable_test) {
85    external_deps += [ "code_signature:liblocal_code_sign_sdk" ]
86    defines += [ "CODE_SIGN_ENABLE" ]
87  }
88  sources += [ "aotcompilerargshandler_unit.cpp" ]
89}
90