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/ohos.gni") 16 17config("inputmethod_js_common_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "./", 21 "${inputmethod_path}/common/include", 22 ] 23 ldflags = [ "-Wl,--exclude-libs=ALL" ] 24 cflags = [ 25 "-fdata-sections", 26 "-ffunction-sections", 27 "-fvisibility=hidden", 28 "-Wno-c99-designator", 29 ] 30} 31 32config("inputmethod_js_common_public_config") { 33 visibility = [ "./*" ] 34 include_dirs = [ 35 "./", 36 "${inputmethod_path}/common/include", 37 "${inputmethod_path}/frameworks/common", 38 ] 39} 40 41ohos_static_library("inputmethod_js_common") { 42 branch_protector_ret = "pac_ret" 43 sanitize = { 44 cfi = true 45 cfi_cross_dso = true 46 debug = false 47 } 48 sources = [ 49 "event_checker.cpp", 50 "js_callback_handler.cpp", 51 "js_callback_object.cpp", 52 "js_util.cpp", 53 ] 54 configs = [ ":inputmethod_js_common_config" ] 55 public_configs = [ ":inputmethod_js_common_public_config" ] 56 deps = [ "${inputmethod_path}/common:inputmethod_common" ] 57 external_deps = [ 58 "c_utils:utils", 59 "eventhandler:libeventhandler", 60 "hilog:libhilog", 61 "napi:ace_napi", 62 ] 63 subsystem_name = "inputmethod" 64 part_name = "imf" 65} 66