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