15bebb993Sopenharmony_ci# Copyright (C) 2024 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("//build/ohos/ndk/ndk.gni") 165bebb993Sopenharmony_ciimport("//foundation/filemanagement/file_api/file_api.gni") 175bebb993Sopenharmony_ci 185bebb993Sopenharmony_ciohos_shared_library("ohfileio") { 195bebb993Sopenharmony_ci sanitize = { 205bebb993Sopenharmony_ci integer_overflow = true 215bebb993Sopenharmony_ci ubsan = true 225bebb993Sopenharmony_ci boundary_sanitize = true 235bebb993Sopenharmony_ci cfi = true 245bebb993Sopenharmony_ci cfi_cross_dso = true 255bebb993Sopenharmony_ci debug = false 265bebb993Sopenharmony_ci } 275bebb993Sopenharmony_ci cflags = [ 285bebb993Sopenharmony_ci "-fvisibility=hidden", 295bebb993Sopenharmony_ci "-fdata-sections", 305bebb993Sopenharmony_ci "-ffunction-sections", 315bebb993Sopenharmony_ci "-Oz", 325bebb993Sopenharmony_ci ] 335bebb993Sopenharmony_ci cflags_cc = [ 345bebb993Sopenharmony_ci "-fvisibility-inlines-hidden", 355bebb993Sopenharmony_ci "-Oz", 365bebb993Sopenharmony_ci ] 375bebb993Sopenharmony_ci include_dirs = [ "./" ] 385bebb993Sopenharmony_ci 395bebb993Sopenharmony_ci sources = [ "./fileio.c" ] 405bebb993Sopenharmony_ci deps = [ "${file_api_path}/interfaces/kits/native:fileio_native" ] 415bebb993Sopenharmony_ci external_deps = [] 425bebb993Sopenharmony_ci 435bebb993Sopenharmony_ci output_name = "ohfileio" 445bebb993Sopenharmony_ci output_extension = "so" 455bebb993Sopenharmony_ci relative_install_dir = "ndk" 465bebb993Sopenharmony_ci part_name = "file_api" 475bebb993Sopenharmony_ci subsystem_name = "filemanagement" 485bebb993Sopenharmony_ci} 495bebb993Sopenharmony_ci 505bebb993Sopenharmony_ciohos_ndk_library("libohfileio") { 515bebb993Sopenharmony_ci ndk_description_file = "./libfileio.ndk.json" 525bebb993Sopenharmony_ci output_name = "ohfileio" 535bebb993Sopenharmony_ci output_extension = "so" 545bebb993Sopenharmony_ci system_capability = "SystemCapability.FileManagement.File.FileIO" 555bebb993Sopenharmony_ci} 565bebb993Sopenharmony_ci 575bebb993Sopenharmony_ciohos_ndk_headers("oh_fileio_header") { 585bebb993Sopenharmony_ci dest_dir = "$ndk_headers_out_dir/filemanagement/fileio/" 595bebb993Sopenharmony_ci sources = [ "./fileio.h" ] 605bebb993Sopenharmony_ci} 61