1# Copyright (c) 2022-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") 15import("../../../access_token.gni") 16 17config("setproc_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ "include" ] 20} 21 22if (is_standard_system) { 23 ohos_static_library("libtoken_setproc") { 24 subsystem_name = "security" 25 part_name = "access_token" 26 output_name = "libtoken_setproc" 27 28 public_configs = [ ":setproc_config" ] 29 30 cflags = [ "-Wall" ] 31 32 include_dirs = [ "src" ] 33 34 sources = [ "src/token_setproc.c" ] 35 } 36 37 ohos_shared_library("libtokensetproc_shared") { 38 subsystem_name = "security" 39 part_name = "access_token" 40 output_name = "libtokensetproc_shared" 41 sanitize = { 42 cfi = true 43 cfi_cross_dso = true 44 debug = false 45 } 46 branch_protector_ret = "pac_ret" 47 innerapi_tags = [ "platformsdk" ] 48 public_configs = [ ":setproc_config" ] 49 50 cflags = [ "-Wall" ] 51 52 include_dirs = [ "src" ] 53 54 sources = [ "src/token_setproc.c" ] 55 } 56 57 ohos_static_library("libperm_setproc") { 58 subsystem_name = "security" 59 part_name = "access_token" 60 output_name = "libperm_setproc" 61 sanitize = { 62 cfi = true 63 cfi_cross_dso = true 64 debug = false 65 } 66 branch_protector_ret = "pac_ret" 67 68 public_configs = [ ":setproc_config" ] 69 70 cflags = [ "-Wall" ] 71 72 include_dirs = [ "src" ] 73 74 sources = [ "src/perm_setproc.cpp" ] 75 } 76} 77