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("//build/ohos.gni") 15 16rust_cxx("samgr_cxx_gen") { 17 sources = [ "src/wrapper.rs" ] 18} 19 20ohos_static_library("samgr_rust_cpp") { 21 sanitize = { 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 cfi_no_nvcall = true 26 blocklist = "../../../cfi_blocklist.txt" 27 } 28 29 sources = [ 30 "src/cxx/status_change_wrapper.cpp", 31 "src/cxx/system_ability_manager_wrapper.cpp", 32 ] 33 34 sources += get_target_outputs(":samgr_cxx_gen") 35 include_dirs = [ 36 "${target_gen_dir}/src", 37 "include", 38 ] 39 deps = [ 40 ":samgr_cxx_gen", 41 "../samgr_proxy:samgr_proxy", 42 "//third_party/rust/crates/cxx:cxx_cppdeps", 43 ] 44 45 external_deps = [ 46 "c_utils:utils", 47 "hilog:libhilog", 48 "ipc:ipc_single", 49 ] 50 51 subsystem_name = "systemabilitymgr" 52 part_name = "samgr" 53} 54 55ohos_rust_shared_library("samgr_rust") { 56 sources = [ "src/lib.rs" ] 57 58 rustflags = [ "-Zstack-protector=all" ] 59 60 external_deps = [ 61 "hilog:hilog_rust", 62 "ipc:ipc_rust", 63 ] 64 65 deps = [ 66 ":samgr_rust_cpp", 67 "//third_party/rust/crates/cxx:lib", 68 ] 69 crate_name = "samgr" 70 71 install_images = [ system_base_dir ] 72 relative_install_dir = "chipset-pub-sdk" 73 74 subsystem_name = "systemabilitymgr" 75 part_name = "samgr" 76} 77