# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//foundation/ability/ability_runtime/ability_runtime.gni") import("//foundation/ability/ability_runtime/cj_environment/cj_environment.gni") ohos_shared_library("cj_ability_ffi") { defines = [ "AMS_LOG_TAG = \"CJ_ABILITY_FFI\"", "AMS_LOG_DOMAIN = 0xD001150", ] sanitize = { cfi = true cfi_cross_dso = true debug = false } include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_delegator/", "${ability_runtime_path}/interfaces/kits/native/ability/native", "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", "${ability_runtime_path}/tools/aa/include", "${ability_runtime_path}/frameworks/cj/ffi", "${ability_runtime_services_path}/common/include", ] deps = [ "${ability_runtime_native_path}/appkit:app_context", "${ability_runtime_native_path}/appkit:appkit_delegator", ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_core", "c_utils:utils", "hilog:libhilog", "napi:cj_bind_native", ] sources = [ "cj_ability_delegator.cpp", "cj_application_context.cpp", "cj_element_name_ffi.cpp", "cj_utils_ffi.cpp", "cj_want_ffi.cpp", ] cflags = [ "-fstack-protector-all", "-fstack-protector-strong", "-O2", "-D_FORTIFY_SOURCE=2", ] cflags_cc = cflags subsystem_name = "ability" part_name = "ability_runtime" }