# Copyright (C) 2023 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") rust_cxx("samgr_cxx_gen") { sources = [ "src/wrapper.rs" ] } ohos_static_library("samgr_rust_cpp") { sanitize = { cfi = true cfi_cross_dso = true debug = false cfi_no_nvcall = true blocklist = "../../../cfi_blocklist.txt" } sources = [ "src/cxx/status_change_wrapper.cpp", "src/cxx/system_ability_manager_wrapper.cpp", ] sources += get_target_outputs(":samgr_cxx_gen") include_dirs = [ "${target_gen_dir}/src", "include", ] deps = [ ":samgr_cxx_gen", "../samgr_proxy:samgr_proxy", "//third_party/rust/crates/cxx:cxx_cppdeps", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_single", ] subsystem_name = "systemabilitymgr" part_name = "samgr" } ohos_rust_shared_library("samgr_rust") { sources = [ "src/lib.rs" ] rustflags = [ "-Zstack-protector=all" ] external_deps = [ "hilog:hilog_rust", "ipc:ipc_rust", ] deps = [ ":samgr_rust_cpp", "//third_party/rust/crates/cxx:lib", ] crate_name = "samgr" install_images = [ system_base_dir ] relative_install_dir = "chipset-pub-sdk" subsystem_name = "systemabilitymgr" part_name = "samgr" }