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")
15import("//build/ohos_var.gni")
16
17config("public_config") {
18  include_dirs = [ "." ]
19}
20
21config("private_config") {
22  include_dirs = [
23    "../../../../services/storage_manager/include",
24    "../../../../services/storage_manager/include",
25    "../../../../services/storage_daemon/include",
26    "../../../../services/common/include",
27  ]
28}
29
30ohos_shared_library("storage_manager_acl") {
31  branch_protector_ret = "pac_ret"
32  sanitize = {
33    integer_overflow = true
34    ubsan = true
35    boundary_sanitize = true
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39  }
40
41  sources = [
42    "../../../../services/storage_daemon/file_sharing/src/acl.cpp",
43    "../../../../services/storage_daemon/file_sharing/src/setacl.cpp",
44    "../../../../services/storage_daemon/utils/file_utils.cpp",
45  ]
46
47  defines = [
48    "STORAGE_LOG_TAG = \"StorageManager\"",
49    "LOG_DOMAIN = 0xD004300",
50  ]
51
52  configs = [ ":private_config" ]
53  public_configs = [ ":public_config" ]
54
55  cflags = [
56    "-D_FORTIFY_SOURCE=2",
57    "-fstack-protector-strong",
58  ]
59
60  external_deps = [
61    "c_utils:utils",
62    "hilog:libhilog",
63    "ipc:ipc_core",
64  ]
65
66  innerapi_tags = [ "chipsetsdk_indirect" ]
67  part_name = "storage_service"
68  subsystem_name = "filemanagement"
69}
70