15ba71b47Sopenharmony_ci# Copyright (C) 2023 Huawei Device Co., Ltd. 25ba71b47Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 35ba71b47Sopenharmony_ci# you may not use this file except in compliance with the License. 45ba71b47Sopenharmony_ci# You may obtain a copy of the License at 55ba71b47Sopenharmony_ci# 65ba71b47Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 75ba71b47Sopenharmony_ci# 85ba71b47Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 95ba71b47Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 105ba71b47Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115ba71b47Sopenharmony_ci# See the License for the specific language governing permissions and 125ba71b47Sopenharmony_ci# limitations under the License. 135ba71b47Sopenharmony_ci 145ba71b47Sopenharmony_ciimport("//build/ohos.gni") 155ba71b47Sopenharmony_ci 165ba71b47Sopenharmony_cirust_cxx("samgr_cxx_gen") { 175ba71b47Sopenharmony_ci sources = [ "src/wrapper.rs" ] 185ba71b47Sopenharmony_ci} 195ba71b47Sopenharmony_ci 205ba71b47Sopenharmony_ciohos_static_library("samgr_rust_cpp") { 215ba71b47Sopenharmony_ci sanitize = { 225ba71b47Sopenharmony_ci cfi = true 235ba71b47Sopenharmony_ci cfi_cross_dso = true 245ba71b47Sopenharmony_ci debug = false 255ba71b47Sopenharmony_ci cfi_no_nvcall = true 265ba71b47Sopenharmony_ci blocklist = "../../../cfi_blocklist.txt" 275ba71b47Sopenharmony_ci } 285ba71b47Sopenharmony_ci 295ba71b47Sopenharmony_ci sources = [ 305ba71b47Sopenharmony_ci "src/cxx/status_change_wrapper.cpp", 315ba71b47Sopenharmony_ci "src/cxx/system_ability_manager_wrapper.cpp", 325ba71b47Sopenharmony_ci ] 335ba71b47Sopenharmony_ci 345ba71b47Sopenharmony_ci sources += get_target_outputs(":samgr_cxx_gen") 355ba71b47Sopenharmony_ci include_dirs = [ 365ba71b47Sopenharmony_ci "${target_gen_dir}/src", 375ba71b47Sopenharmony_ci "include", 385ba71b47Sopenharmony_ci ] 395ba71b47Sopenharmony_ci deps = [ 405ba71b47Sopenharmony_ci ":samgr_cxx_gen", 415ba71b47Sopenharmony_ci "../samgr_proxy:samgr_proxy", 425ba71b47Sopenharmony_ci "//third_party/rust/crates/cxx:cxx_cppdeps", 435ba71b47Sopenharmony_ci ] 445ba71b47Sopenharmony_ci 455ba71b47Sopenharmony_ci external_deps = [ 465ba71b47Sopenharmony_ci "c_utils:utils", 475ba71b47Sopenharmony_ci "hilog:libhilog", 485ba71b47Sopenharmony_ci "ipc:ipc_single", 495ba71b47Sopenharmony_ci ] 505ba71b47Sopenharmony_ci 515ba71b47Sopenharmony_ci subsystem_name = "systemabilitymgr" 525ba71b47Sopenharmony_ci part_name = "samgr" 535ba71b47Sopenharmony_ci} 545ba71b47Sopenharmony_ci 555ba71b47Sopenharmony_ciohos_rust_shared_library("samgr_rust") { 565ba71b47Sopenharmony_ci sources = [ "src/lib.rs" ] 575ba71b47Sopenharmony_ci 585ba71b47Sopenharmony_ci rustflags = [ "-Zstack-protector=all" ] 595ba71b47Sopenharmony_ci 605ba71b47Sopenharmony_ci external_deps = [ 615ba71b47Sopenharmony_ci "hilog:hilog_rust", 625ba71b47Sopenharmony_ci "ipc:ipc_rust", 635ba71b47Sopenharmony_ci ] 645ba71b47Sopenharmony_ci 655ba71b47Sopenharmony_ci deps = [ 665ba71b47Sopenharmony_ci ":samgr_rust_cpp", 675ba71b47Sopenharmony_ci "//third_party/rust/crates/cxx:lib", 685ba71b47Sopenharmony_ci ] 695ba71b47Sopenharmony_ci crate_name = "samgr" 705ba71b47Sopenharmony_ci 715ba71b47Sopenharmony_ci install_images = [ system_base_dir ] 725ba71b47Sopenharmony_ci relative_install_dir = "chipset-pub-sdk" 735ba71b47Sopenharmony_ci 745ba71b47Sopenharmony_ci subsystem_name = "systemabilitymgr" 755ba71b47Sopenharmony_ci part_name = "samgr" 765ba71b47Sopenharmony_ci} 77