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("//base/startup/appspawn/appspawn.gni") 15import("//build/ohos.gni") 16 17config("exported_header_files") { 18 visibility = [ ":*" ] 19 include_dirs = [ "${appspawn_innerkits_path}/include" ] 20} 21 22if (!defined(ohos_lite)) { 23 ohos_shared_library("appspawn_client") { 24 branch_protector_ret = "pac_ret" 25 sources = [ 26 "${appspawn_path}/modules/sandbox/appspawn_permission.c", 27 "../permission/appspawn_mount_permission.c", 28 "appspawn_client.c", 29 "appspawn_msg.c", 30 ] 31 include_dirs = [ 32 ".", 33 "../include", 34 "../permission", 35 "${appspawn_path}/modules/module_engine/include", 36 "${appspawn_path}", 37 "${appspawn_path}/modules/sandbox", 38 "${appspawn_path}/util/include", 39 ] 40 41 defines = [ 42 "APPSPAWN_CLIENT", 43 "APPSPAWN_LABEL=\"APPSPAWN_CLIENT\"", 44 ] 45 46 if (defined(appspawn_sandbox_new) && appspawn_sandbox_new) { 47 defines += [ "APPSPAWN_SANDBOX_NEW" ] 48 } 49 if (is_asan) { 50 defines += [ "APPSPAWN_ASAN" ] 51 } 52 if (asan_detector || is_asan) { 53 defines += [ "ASAN_DETECTOR" ] 54 } 55 public_configs = [ ":exported_header_files" ] 56 version_script = "libappspawn_client.versionscript" 57 58 deps = [ "${appspawn_path}/util:libappspawn_util" ] 59 external_deps = [ 60 "cJSON:cjson", 61 "c_utils:utils", 62 "config_policy:configpolicy_util", 63 "hilog:libhilog", 64 "init:libbegetutil", 65 ] 66 subsystem_name = "${subsystem_name}" 67 part_name = "${part_name}" 68 } 69} else { 70 group("appspawn_client") { 71 } 72} 73