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("//base/inputmethod/imf/inputmethod.gni")
15import("//build/config/features.gni")
16import("//build/ohos.gni")
17
18config("imf_sa_stub_fuzztest_common_config") {
19  include_dirs = [
20    "${inputmethod_path}/services/adapter/ime_connection_manager/include",
21    "${inputmethod_path}/services/include",
22    "${inputmethod_path}/test/common",
23    "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest",
24  ]
25  cflags = [
26    "-g",
27    "-O0",
28    "-Wno-unused-variable",
29    "-fno-omit-frame-pointer",
30  ]
31}
32
33ohos_static_library("imf_sa_stub_fuzztest_common_static") {
34  testonly = true
35  branch_protector_ret = "pac_ret"
36  sanitize = {
37    cfi = true
38    cfi_cross_dso = true
39    debug = false
40  }
41  sources = [
42    "${inputmethod_path}/services/adapter/ime_connection_manager/src/ime_connection.cpp",
43    "imf_sa_stub_fuzz_util.cpp",
44  ]
45
46  public_deps = [
47    "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:inputmethod_client_static",
48    "${inputmethod_path}/services:inputmethod_service_static",
49    "${inputmethod_path}/test/common:inputmethod_test_common",
50  ]
51
52  public_configs = [ ":imf_sa_stub_fuzztest_common_config" ]
53
54  external_deps = [
55    "ability_runtime:ability_manager",
56    "access_token:libaccesstoken_sdk",
57    "access_token:libnativetoken",
58    "access_token:libtoken_setproc",
59    "bundle_framework:appexecfwk_core",
60    "c_utils:utils",
61    "data_share:datashare_common",
62    "data_share:datashare_consumer",
63    "hilog:libhilog",
64    "input:libmmi-client",
65    "ipc:ipc_single",
66  ]
67
68  subsystem_name = "inputmethod"
69  part_name = "imf"
70}
71