15bebb993Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
25bebb993Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
35bebb993Sopenharmony_ci# you may not use this file except in compliance with the License.
45bebb993Sopenharmony_ci# You may obtain a copy of the License at
55bebb993Sopenharmony_ci#
65bebb993Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
75bebb993Sopenharmony_ci#
85bebb993Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
95bebb993Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
105bebb993Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115bebb993Sopenharmony_ci# See the License for the specific language governing permissions and
125bebb993Sopenharmony_ci# limitations under the License.
135bebb993Sopenharmony_ci
145bebb993Sopenharmony_ciimport("//build/ohos.gni")
155bebb993Sopenharmony_ciimport("//foundation/filemanagement/file_api/file_api.gni")
165bebb993Sopenharmony_ci
175bebb993Sopenharmony_ciconfig("log_public_config") {
185bebb993Sopenharmony_ci  visibility = [ ":*" ]
195bebb993Sopenharmony_ci
205bebb993Sopenharmony_ci  include_dirs = [ "." ]
215bebb993Sopenharmony_ci}
225bebb993Sopenharmony_ci
235bebb993Sopenharmony_ciohos_shared_library("filemgmt_libhilog") {
245bebb993Sopenharmony_ci  if (!use_mingw_win && !use_mac) {
255bebb993Sopenharmony_ci    cflags = [
265bebb993Sopenharmony_ci      "-fvisibility=hidden",
275bebb993Sopenharmony_ci      "-fdata-sections",
285bebb993Sopenharmony_ci      "-ffunction-sections",
295bebb993Sopenharmony_ci      "-Oz",
305bebb993Sopenharmony_ci    ]
315bebb993Sopenharmony_ci    cflags_cc = [
325bebb993Sopenharmony_ci      "-fvisibility-inlines-hidden",
335bebb993Sopenharmony_ci      "-Oz",
345bebb993Sopenharmony_ci    ]
355bebb993Sopenharmony_ci
365bebb993Sopenharmony_ci    branch_protector_ret = "pac_ret"
375bebb993Sopenharmony_ci    sanitize = {
385bebb993Sopenharmony_ci      integer_overflow = true
395bebb993Sopenharmony_ci      ubsan = true
405bebb993Sopenharmony_ci      boundary_sanitize = true
415bebb993Sopenharmony_ci      cfi = true
425bebb993Sopenharmony_ci      cfi_cross_dso = true
435bebb993Sopenharmony_ci      debug = false
445bebb993Sopenharmony_ci    }
455bebb993Sopenharmony_ci  }
465bebb993Sopenharmony_ci
475bebb993Sopenharmony_ci  public_configs = [ ":log_public_config" ]
485bebb993Sopenharmony_ci
495bebb993Sopenharmony_ci  external_deps = [ "hilog:libhilog" ]
505bebb993Sopenharmony_ci
515bebb993Sopenharmony_ci  subsystem_name = "filemanagement"
525bebb993Sopenharmony_ci  innerapi_tags = [ "platformsdk" ]
535bebb993Sopenharmony_ci  part_name = "file_api"
545bebb993Sopenharmony_ci}
55