10fed37d5Sopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd. 20fed37d5Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 30fed37d5Sopenharmony_ci# you may not use this file except in compliance with the License. 40fed37d5Sopenharmony_ci# You may obtain a copy of the License at 50fed37d5Sopenharmony_ci# 60fed37d5Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 70fed37d5Sopenharmony_ci# 80fed37d5Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 90fed37d5Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 100fed37d5Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110fed37d5Sopenharmony_ci# See the License for the specific language governing permissions and 120fed37d5Sopenharmony_ci# limitations under the License. 130fed37d5Sopenharmony_ci 140fed37d5Sopenharmony_ciimport("//build/ohos.gni") 150fed37d5Sopenharmony_ci 160fed37d5Sopenharmony_cirust_cxx("system_ability_fwk_rust_gen") { 170fed37d5Sopenharmony_ci sources = [ "src/wrapper.rs" ] 180fed37d5Sopenharmony_ci} 190fed37d5Sopenharmony_ci 200fed37d5Sopenharmony_ciohos_static_library("system_ability_fwk_rust_cxx") { 210fed37d5Sopenharmony_ci sanitize = { 220fed37d5Sopenharmony_ci cfi = true 230fed37d5Sopenharmony_ci cfi_cross_dso = true 240fed37d5Sopenharmony_ci debug = false 250fed37d5Sopenharmony_ci cfi_no_nvcall = true 260fed37d5Sopenharmony_ci blocklist = "../../../../cfi_blocklist.txt" 270fed37d5Sopenharmony_ci } 280fed37d5Sopenharmony_ci 290fed37d5Sopenharmony_ci sources = [ "src/cxx/system_ability_wrapper.cpp" ] 300fed37d5Sopenharmony_ci sources += get_target_outputs(":system_ability_fwk_rust_gen") 310fed37d5Sopenharmony_ci 320fed37d5Sopenharmony_ci include_dirs = [ 330fed37d5Sopenharmony_ci "${target_gen_dir}/src", 340fed37d5Sopenharmony_ci "include", 350fed37d5Sopenharmony_ci ] 360fed37d5Sopenharmony_ci external_deps = [ 370fed37d5Sopenharmony_ci "hilog:libhilog", 380fed37d5Sopenharmony_ci "samgr:samgr_proxy", 390fed37d5Sopenharmony_ci ] 400fed37d5Sopenharmony_ci deps = [ 410fed37d5Sopenharmony_ci ":system_ability_fwk_rust_gen", 420fed37d5Sopenharmony_ci "../../safwk:system_ability_fwk", 430fed37d5Sopenharmony_ci "//third_party/rust/crates/cxx:cxx_cppdeps", 440fed37d5Sopenharmony_ci ] 450fed37d5Sopenharmony_ci 460fed37d5Sopenharmony_ci subsystem_name = "systemabilitymgr" 470fed37d5Sopenharmony_ci part_name = "safwk" 480fed37d5Sopenharmony_ci} 490fed37d5Sopenharmony_ci 500fed37d5Sopenharmony_ciohos_rust_shared_library("system_ability_fwk_rust") { 510fed37d5Sopenharmony_ci crate_name = "system_ability_fwk" 520fed37d5Sopenharmony_ci 530fed37d5Sopenharmony_ci sources = [ "src/lib.rs" ] 540fed37d5Sopenharmony_ci 550fed37d5Sopenharmony_ci rustflags = [ "-Zstack-protector=all" ] 560fed37d5Sopenharmony_ci 570fed37d5Sopenharmony_ci deps = [ 580fed37d5Sopenharmony_ci ":system_ability_fwk_rust_cxx", 590fed37d5Sopenharmony_ci "//third_party/rust/crates/cxx:lib", 600fed37d5Sopenharmony_ci ] 610fed37d5Sopenharmony_ci 620fed37d5Sopenharmony_ci external_deps = [ 630fed37d5Sopenharmony_ci "hilog:hilog_rust", 640fed37d5Sopenharmony_ci "ipc:ipc_rust", 650fed37d5Sopenharmony_ci ] 660fed37d5Sopenharmony_ci 670fed37d5Sopenharmony_ci install_images = [ system_base_dir ] 680fed37d5Sopenharmony_ci relative_install_dir = "chipset-pub-sdk" 690fed37d5Sopenharmony_ci 700fed37d5Sopenharmony_ci subsystem_name = "systemabilitymgr" 710fed37d5Sopenharmony_ci part_name = "safwk" 720fed37d5Sopenharmony_ci} 73