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") 16import("//build/ohos/native_stub/native_stub.gni") 17 18# 19# exported include directories 20# 21config("appspawn_module_engine_exported_config") { 22 visibility = [ ":*" ] 23 visibility += [ "include" ] 24 include_dirs = [ 25 "${appspawn_innerkits_path}/include", 26 "${appspawn_path}/modules/module_engine/include", 27 "${appspawn_path}/util/include", 28 ] 29 if (is_debug || build_variant == "root") { 30 defines = [ "DEBUG_BEGETCTL_BOOT" ] 31 } 32} 33 34# 35# innerkits for module development 36# 37ohos_native_stub_library("libappspawn_module_engine") { 38 cflags = [ "-fstack-protector-all" ] 39 output_extension = "so" 40 public_configs = [ ":appspawn_module_engine_exported_config" ] 41 stub_description_file = "./stub/libappspawn.stub.json" 42} 43 44# 45# For appspawn linking, 46# export symbols defined in this json files only 47# 48ohos_native_stub_versionscript("libappspawn_stub_versionscript") { 49 stub_description_file = "./stub/libappspawn.stub.json" 50} 51 52# 53# Generate empty library with symlink name to satisfy appspawn loading required libraries 54# 55ohos_native_stub_library("libappspawn_stub_empty") { 56 cflags = [ "-fstack-protector-all" ] 57 output_extension = "so" 58 stub_description_file = "./stub/libappspawn.stub.empty.json" 59 subsystem_name = "${subsystem_name}" 60 part_name = "${part_name}" 61 install_enable = true 62 install_images = [ "system" ] 63 symlink_target_name = [ "libappspawn_module_engine.so" ] 64} 65