# Copyright (c) 2021-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/config/components/ets_frontend/ets2abc_config.gni") import("//build/ohos.gni") import("//foundation/filemanagement/file_api/file_api.gni") file_common_src = [ "src/common/file_helper/fd_guard.cpp", "src/common/napi/n_async/n_async_work_callback.cpp", "src/common/napi/n_async/n_async_work_promise.cpp", "src/common/napi/n_async/n_ref.cpp", "src/common/napi/n_class.cpp", "src/common/napi/n_func_arg.cpp", "src/common/napi/n_val.cpp", "src/common/uni_error.cpp", ] config("kits_public_config") { visibility = [ ":*" ] include_dirs = [ "src/mod_securitylabel" ] } ohos_shared_library("fileio") { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module" include_dirs = [ "src/common", "src/common/file_helper", "src/common/napi", "src/common/napi/n_async", "src/mod_fileio", "${utils_path}/common/include", ] sources = file_common_src sources += [ "src/common/file_helper/hash_file.cpp", "src/mod_fileio/class_constants/constants.cpp", "src/mod_fileio/class_dir/dir_n_exporter.cpp", "src/mod_fileio/class_dirent/dirent_n_exporter.cpp", "src/mod_fileio/class_stat/stat_n_exporter.cpp", "src/mod_fileio/class_stream/flush.cpp", "src/mod_fileio/class_stream/stream_n_exporter.cpp", "src/mod_fileio/class_watcher/watcher_n_exporter.cpp", "src/mod_fileio/common_func.cpp", "src/mod_fileio/module.cpp", "src/mod_fileio/properties/chmod.cpp", "src/mod_fileio/properties/chown.cpp", "src/mod_fileio/properties/close.cpp", "src/mod_fileio/properties/copy_file.cpp", "src/mod_fileio/properties/create_stream.cpp", "src/mod_fileio/properties/fchmod.cpp", "src/mod_fileio/properties/fchown.cpp", "src/mod_fileio/properties/fdatasync.cpp", "src/mod_fileio/properties/fdopen_stream.cpp", "src/mod_fileio/properties/fstat.cpp", "src/mod_fileio/properties/fsync.cpp", "src/mod_fileio/properties/ftruncate.cpp", "src/mod_fileio/properties/hash.cpp", "src/mod_fileio/properties/lchown.cpp", "src/mod_fileio/properties/link.cpp", "src/mod_fileio/properties/lseek.cpp", "src/mod_fileio/properties/lstat.cpp", "src/mod_fileio/properties/mkdtemp.cpp", "src/mod_fileio/properties/open.cpp", "src/mod_fileio/properties/open_dir.cpp", "src/mod_fileio/properties/posix_fallocate.cpp", "src/mod_fileio/properties/prop_n_exporter.cpp", "src/mod_fileio/properties/read_dir.cpp", "src/mod_fileio/properties/read_text.cpp", "src/mod_fileio/properties/rename.cpp", "src/mod_fileio/properties/rmdir.cpp", "src/mod_fileio/properties/rmdirent.cpp", "src/mod_fileio/properties/stat.cpp", "src/mod_fileio/properties/symlink.cpp", "src/mod_fileio/properties/truncate.cpp", "src/mod_fileio/properties/watcher.cpp", ] deps = [ "${file_api_path}/interfaces/kits/native:remote_uri_native", "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", ] use_exceptions = true external_deps = [ "ability_base:zuri", "bounds_checking_function:libsec_shared", "c_utils:utils", "hilog:libhilog", "libuv:uv", "napi:ace_napi", "openssl:libcrypto_shared", ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } ohos_shared_library("fs") { subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module/file" include_dirs = [ "${src_path}/common", "${src_path}/common/file_helper", "${src_path}/mod_fs", "${src_path}/mod_fs/properties", "${src_path}/mod_fs/properties/copy_listener", "${utils_path}/common/include", ] sources = [ "src/common/file_helper/fd_guard.cpp", "src/mod_fs/class_file/file_n_exporter.cpp", "src/mod_fs/class_stat/stat_n_exporter.cpp", "src/mod_fs/common_func.cpp", "src/mod_fs/module.cpp", "src/mod_fs/properties/close.cpp", "src/mod_fs/properties/fdatasync.cpp", "src/mod_fs/properties/fsync.cpp", "src/mod_fs/properties/lstat.cpp", "src/mod_fs/properties/mkdtemp.cpp", "src/mod_fs/properties/open.cpp", "src/mod_fs/properties/prop_n_exporter.cpp", "src/mod_fs/properties/rename.cpp", "src/mod_fs/properties/rmdirent.cpp", "src/mod_fs/properties/stat.cpp", "src/mod_fs/properties/truncate.cpp", "src/mod_fs/properties/utimes.cpp", ] cflags_cc = [ "-std=c++17" ] deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", ] use_exceptions = true if (use_mingw_win) { defines = [ "WIN_PLATFORM" ] } if (use_mac) { defines = [ "IOS_PLATFORM" ] } external_deps = [ "hilog:libhilog", "napi:ace_napi", ] if (!use_mingw_win && !use_mac) { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc += [ "-fvisibility-inlines-hidden", "-Oz", ] defines = [ "FILE_API_TRACE" ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } include_dirs += [ "${file_api_path}/interfaces/kits/rust/include" ] sources += [ "src/mod_fs/class_atomicfile/atomicfile_n_exporter.cpp", "src/mod_fs/class_randomaccessfile/randomaccessfile_n_exporter.cpp", "src/mod_fs/class_readeriterator/readeriterator_n_exporter.cpp", "src/mod_fs/class_stream/stream_n_exporter.cpp", "src/mod_fs/class_tasksignal/task_signal_entity.cpp", "src/mod_fs/class_tasksignal/task_signal_n_exporter.cpp", "src/mod_fs/class_watcher/watcher_entity.cpp", "src/mod_fs/class_watcher/watcher_n_exporter.cpp", "src/mod_fs/properties/connectdfs.cpp", "src/mod_fs/properties/copy.cpp", "src/mod_fs/properties/copy_file.cpp", "src/mod_fs/properties/copy_listener/trans_listener.cpp", "src/mod_fs/properties/copydir.cpp", "src/mod_fs/properties/create_randomaccessfile.cpp", "src/mod_fs/properties/create_stream.cpp", "src/mod_fs/properties/create_streamrw.cpp", "src/mod_fs/properties/disconnectdfs.cpp", "src/mod_fs/properties/dup.cpp", "src/mod_fs/properties/fdopen_stream.cpp", "src/mod_fs/properties/listfile.cpp", "src/mod_fs/properties/lseek.cpp", "src/mod_fs/properties/move.cpp", "src/mod_fs/properties/movedir.cpp", "src/mod_fs/properties/read_lines.cpp", "src/mod_fs/properties/read_text.cpp", "src/mod_fs/properties/symlink.cpp", "src/mod_fs/properties/watcher.cpp", "src/mod_fs/properties/xattr.cpp", ] external_deps += [ "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:extensionkit_native", "access_token:libtokenid_sdk", "app_file_service:fileuri_native", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "dfs_service:distributed_file_daemon_kit_inner", "dfs_service:libdistributedfileutils", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "ipc:ipc_core", "libuv:uv", "samgr:samgr_proxy", ] deps += [ "${file_api_path}/interfaces/kits/native:remote_uri_native", "${file_api_path}/interfaces/kits/native:task_signal_native", "${file_api_path}/interfaces/kits/rust:rust_file", ] } } ohos_shared_library("hash") { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module/file" include_dirs = [ "${src_path}/common", "${src_path}/common/file_helper", "${src_path}/mod_hash", "${src_path}/mod_hash/class_hashstream", ] sources = [ "src/common/file_helper/fd_guard.cpp", "src/common/file_helper/hash_file.cpp", "src/mod_hash/class_hashstream/hashstream_n_exporter.cpp", "src/mod_hash/create_streamhash.cpp", "src/mod_hash/hash.cpp", "src/mod_hash/module.cpp", ] deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", ] external_deps = [ "bounds_checking_function:libsec_shared", "hilog:libhilog", "napi:ace_napi", "openssl:libcrypto_shared", ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } ohos_shared_library("file") { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module" include_dirs = [ "src/common", "src/common/napi", "src/common/napi/n_async", "src/common/file_helper", "src/mod_file", ] sources = file_common_src sources += [ "src/common/ability_helper.cpp", "src/mod_file/class_file/file_n_exporter.cpp", "src/mod_file/common_func.cpp", "src/mod_file/module.cpp", ] external_deps = [ "ability_runtime:abilitykit_native", "ability_runtime:extensionkit_native", "bounds_checking_function:libsec_shared", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hilog:libhilog", "napi:ace_napi", ] if (file_api_read_optimize) { defines = [ "WEARABLE_PRODUCT" ] } } ohos_shared_library("statfs") { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module" sources = [ "src/mod_statfs/statfs_n_exporter.cpp", "src/mod_statfs/statfs_napi.cpp", ] deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", ] external_deps = [ "hilog:libhilog", "napi:ace_napi", ] } ohos_shared_library("statvfs") { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module/file" sources = [ "src/mod_statvfs/statvfs_n_exporter.cpp", "src/mod_statvfs/statvfs_napi.cpp", ] deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", ] external_deps = [ "hilog:libhilog", "napi:ace_napi", ] } ohos_shared_library("environment") { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module/file" sources = [ "src/mod_environment/environment_n_exporter.cpp", "src/mod_environment/environment_napi.cpp", ] deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "napi:ace_napi", "os_account:os_account_innerkits", ] } ohos_shared_library("securitylabel") { branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module/file" cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Wno-format", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] sources = [ "src/mod_securitylabel/securitylabel_n_exporter.cpp", "src/mod_securitylabel/securitylabel_napi.cpp", ] public_configs = [ ":kits_public_config" ] deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", ] external_deps = [ "access_token:libtokenid_sdk", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", ] } ohos_shared_library("document") { cflags = [ "-fvisibility=hidden", "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } subsystem_name = "filemanagement" part_name = "file_api" relative_install_dir = "module" include_dirs = [ "src/common", "src/common/napi", "src/common/napi/n_async", ] sources = [ "src/common/napi/n_async/n_async_work_callback.cpp", "src/common/napi/n_async/n_async_work_promise.cpp", "src/common/napi/n_async/n_ref.cpp", "src/common/napi/n_func_arg.cpp", "src/common/napi/n_val.cpp", "src/common/uni_error.cpp", "src/mod_document/document_n_exporter.cpp", "src/mod_document/document_napi.cpp", ] external_deps = [ "hilog:libhilog", "napi:ace_napi", ] } group("build_kits_js") { deps = [ ":document", ":environment", ":file", ":fileio", ":fs", ":hash", ":securitylabel", ":statfs", ":statvfs", ] } group("ani_file_api") { deps = [ ":ani_file_environment", ":ani_file_fs", ":ani_file_hash", ":ani_file_securitylabel", ":ani_file_statvfs", ] } config("ani_config") { include_dirs = [ "./include", "${file_api_path}/interfaces/kits/rust/include", "${utils_path}/common/include", "${utils_path}/filemgmt_libfs/include", "${utils_path}/filemgmt_libhilog", "src/common", "src/common/ani_helper", "src/common/file_helper", "src/mod_fs", ] cflags = [ "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-std=c++17", "-fvisibility-inlines-hidden", "-Oz", ] } ohos_shared_library("ani_file_fs") { public_configs = [ ":ani_config" ] include_dirs = [ "include/ipc", "src/mod_fs/ani", "src/mod_fs/class_atomicfile", "src/mod_fs/class_atomicfile/ani", "src/mod_fs/class_file", "src/mod_fs/class_file/ani", "src/mod_fs/class_randomaccessfile", "src/mod_fs/class_randomaccessfile/ani", "src/mod_fs/class_readeriterator", "src/mod_fs/class_readeriterator/ani", "src/mod_fs/class_stat", "src/mod_fs/class_stat/ani", "src/mod_fs/class_stream", "src/mod_fs/class_stream/ani", "src/mod_fs/class_tasksignal", "src/mod_fs/class_tasksignal/ani", "src/mod_fs/class_watcher", "src/mod_fs/class_watcher/ani", "src/mod_fs/properties", "src/mod_fs/properties/ani", "src/mod_fs/properties/copy_listener", "src/mod_fs/properties/copy_listener/ani", ] sources = [ "src/common/ani_helper/ani_signature.cpp", "src/common/ani_helper/error_handler.cpp", "src/common/ani_helper/type_converter.cpp", "src/common/file_helper/fd_guard.cpp", "src/mod_fs/ani/bind_function_class.cpp", "src/mod_fs/class_atomicfile/ani/atomicfile_ani.cpp", "src/mod_fs/class_atomicfile/fs_atomicfile.cpp", "src/mod_fs/class_file/ani/file_ani.cpp", "src/mod_fs/class_file/ani/file_wrapper.cpp", "src/mod_fs/class_file/file_instantiator.cpp", "src/mod_fs/class_file/fs_file.cpp", "src/mod_fs/class_randomaccessfile/ani/randomaccessfile_ani.cpp", "src/mod_fs/class_randomaccessfile/fs_randomaccessfile.cpp", "src/mod_fs/class_readeriterator/ani/reader_iterator_ani.cpp", "src/mod_fs/class_readeriterator/ani/reader_iterator_result_ani.cpp", "src/mod_fs/class_readeriterator/fs_reader_iterator.cpp", "src/mod_fs/class_stat/ani/lstat_ani.cpp", "src/mod_fs/class_stat/ani/stat_ani.cpp", "src/mod_fs/class_stat/ani/stat_wrapper.cpp", "src/mod_fs/class_stat/fs_stat.cpp", "src/mod_fs/class_stat/stat_instantiator.cpp", "src/mod_fs/class_stream/ani/stream_ani.cpp", "src/mod_fs/class_stream/ani/stream_wrapper.cpp", "src/mod_fs/class_stream/fs_stream.cpp", "src/mod_fs/class_stream/stream_instantiator.cpp", "src/mod_fs/class_tasksignal/ani/task_signal_ani.cpp", "src/mod_fs/class_tasksignal/ani/task_signal_listener_ani.cpp", "src/mod_fs/class_tasksignal/ani/task_signal_wrapper.cpp", "src/mod_fs/class_tasksignal/fs_task_signal.cpp", "src/mod_fs/class_watcher/ani/fs_watcher_ani.cpp", "src/mod_fs/class_watcher/ani/fs_watcher_wrapper.cpp", "src/mod_fs/class_watcher/ani/watch_event_listener.cpp", "src/mod_fs/class_watcher/ani/watch_event_wrapper.cpp", "src/mod_fs/class_watcher/fs_file_watcher.cpp", "src/mod_fs/class_watcher/fs_watcher.cpp", "src/mod_fs/class_watcher/watcher_data_cache.cpp", "src/mod_fs/fs_utils.cpp", "src/mod_fs/properties/access_core.cpp", "src/mod_fs/properties/ani/access_ani.cpp", "src/mod_fs/properties/ani/close_ani.cpp", "src/mod_fs/properties/ani/copy_ani.cpp", "src/mod_fs/properties/ani/copy_dir_ani.cpp", "src/mod_fs/properties/ani/copy_file_ani.cpp", "src/mod_fs/properties/ani/create_randomaccessfile_ani.cpp", "src/mod_fs/properties/ani/create_stream_ani.cpp", "src/mod_fs/properties/ani/dup_ani.cpp", "src/mod_fs/properties/ani/fdatasync_ani.cpp", "src/mod_fs/properties/ani/fdopen_stream_ani.cpp", "src/mod_fs/properties/ani/fsync_ani.cpp", "src/mod_fs/properties/ani/listfile_ani.cpp", "src/mod_fs/properties/ani/lseek_ani.cpp", "src/mod_fs/properties/ani/mkdir_ani.cpp", "src/mod_fs/properties/ani/mkdtemp_ani.cpp", "src/mod_fs/properties/ani/move_ani.cpp", "src/mod_fs/properties/ani/movedir_ani.cpp", "src/mod_fs/properties/ani/open_ani.cpp", "src/mod_fs/properties/ani/read_ani.cpp", "src/mod_fs/properties/ani/read_lines_ani.cpp", "src/mod_fs/properties/ani/read_text_ani.cpp", "src/mod_fs/properties/ani/rename_ani.cpp", "src/mod_fs/properties/ani/rmdir_ani.cpp", "src/mod_fs/properties/ani/symlink_ani.cpp", "src/mod_fs/properties/ani/truncate_ani.cpp", "src/mod_fs/properties/ani/unlink_ani.cpp", "src/mod_fs/properties/ani/utimes_ani.cpp", "src/mod_fs/properties/ani/watcher_ani.cpp", "src/mod_fs/properties/ani/write_ani.cpp", "src/mod_fs/properties/ani/xattr_ani.cpp", "src/mod_fs/properties/close_core.cpp", "src/mod_fs/properties/copy_core.cpp", "src/mod_fs/properties/copy_dir_core.cpp", "src/mod_fs/properties/copy_file_core.cpp", "src/mod_fs/properties/copy_listener/ani/progress_listener_ani.cpp", "src/mod_fs/properties/copy_listener/trans_listener_core.cpp", "src/mod_fs/properties/create_randomaccessfile_core.cpp", "src/mod_fs/properties/create_stream_core.cpp", "src/mod_fs/properties/dup_core.cpp", "src/mod_fs/properties/fdatasync_core.cpp", "src/mod_fs/properties/fdopen_stream_core.cpp", "src/mod_fs/properties/fsync_core.cpp", "src/mod_fs/properties/listfile_core.cpp", "src/mod_fs/properties/lseek_core.cpp", "src/mod_fs/properties/lstat_core.cpp", "src/mod_fs/properties/mkdir_core.cpp", "src/mod_fs/properties/mkdtemp_core.cpp", "src/mod_fs/properties/move_core.cpp", "src/mod_fs/properties/movedir_core.cpp", "src/mod_fs/properties/open_core.cpp", "src/mod_fs/properties/read_core.cpp", "src/mod_fs/properties/read_lines_core.cpp", "src/mod_fs/properties/read_text_core.cpp", "src/mod_fs/properties/rename_core.cpp", "src/mod_fs/properties/rmdir_core.cpp", "src/mod_fs/properties/stat_core.cpp", "src/mod_fs/properties/symlink_core.cpp", "src/mod_fs/properties/truncate_core.cpp", "src/mod_fs/properties/unlink_core.cpp", "src/mod_fs/properties/utimes_core.cpp", "src/mod_fs/properties/watcher_core.cpp", "src/mod_fs/properties/write_core.cpp", "src/mod_fs/properties/xattr_core.cpp", ] deps = [ ":ohos_file_fs_abc_etc", "${file_api_path}/interfaces/kits/native:remote_uri_native", "${file_api_path}/interfaces/kits/native:task_signal_native", "${file_api_path}/interfaces/kits/rust:rust_file", "${utils_path}/filemgmt_libfs:filemgmt_libfs", "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", ] use_exceptions = true external_deps = [ "ability_runtime:ability_manager", "app_file_service:fileuri_native", "bounds_checking_function:libsec_shared", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "data_share:datashare_common", "data_share:datashare_consumer", "dfs_service:distributed_file_daemon_kit_inner", "dfs_service:libdistributedfileutils", "eventhandler:libeventhandler", "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_core", "libuv:uv", "runtime_core:ani", "runtime_core:ani_helpers", "runtime_core:libarkruntime", "samgr:samgr_proxy", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } output_extension = "so" subsystem_name = "filemanagement" part_name = "file_api" } generate_static_abc("ohos_file_fs_abc") { base_url = "./src/mod_fs/ani/ets" files = [ "./src/mod_fs/ani/ets/@ohos.file.fs.ets" ] is_boot_abc = "True" device_dst_file = "/system/framework/ohos_file_fs_abc.abc" } ohos_prebuilt_etc("ohos_file_fs_abc_etc") { source = "$target_out_dir/ohos_file_fs_abc.abc" module_install_dir = "framework" subsystem_name = "filemanagement" part_name = "file_api" deps = [ ":ohos_file_fs_abc" ] } ohos_shared_library("ani_file_hash") { public_configs = [ ":ani_config" ] include_dirs = [ "src/mod_hash", "src/mod_hash/ani", "src/mod_hash/class_hashstream", "src/mod_hash/class_hashstream/ani", ] sources = [ "src/common/ani_helper/ani_signature.cpp", "src/common/ani_helper/error_handler.cpp", "src/common/ani_helper/type_converter.cpp", "src/common/file_helper/fd_guard.cpp", "src/common/file_helper/hash_file.cpp", "src/mod_fs/fs_utils.cpp", "src/mod_hash/ani/bind_function_class.cpp", "src/mod_hash/ani/hash_ani.cpp", "src/mod_hash/class_hashstream/ani/hashstream_ani.cpp", "src/mod_hash/class_hashstream/hs_hashstream.cpp", "src/mod_hash/hash_core.cpp", ] deps = [ ":ohos_file_hash_abc_etc", "${file_api_path}/interfaces/kits/rust:rust_file", "${utils_path}/filemgmt_libfs:filemgmt_libfs", "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", ] external_deps = [ "eventhandler:libeventhandler", "bounds_checking_function:libsec_shared", "hilog:libhilog", "ipc:ipc_core", "libuv:uv", "openssl:libcrypto_shared", "runtime_core:ani", "runtime_core:ani_helpers", "runtime_core:libarkruntime", ] use_exceptions = true branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } output_extension = "so" subsystem_name = "filemanagement" part_name = "file_api" } generate_static_abc("ohos_file_hash_abc") { base_url = "./src/mod_hash/ani/ets" files = [ "./src/mod_hash/ani/ets/@ohos.file.hash.ets" ] is_boot_abc = "True" device_dst_file = "/system/framework/ohos_file_hash_abc.abc" } ohos_prebuilt_etc("ohos_file_hash_abc_etc") { source = "$target_out_dir/ohos_file_hash_abc.abc" module_install_dir = "framework" subsystem_name = "filemanagement" part_name = "file_api" deps = [ ":ohos_file_hash_abc" ] } ohos_shared_library("ani_file_securitylabel") { public_configs = [ ":ani_config" ] include_dirs = [ "src/mod_securitylabel/ani", "src/mod_securitylabel", ] sources = [ "src/common/ani_helper/ani_signature.cpp", "src/common/ani_helper/error_handler.cpp", "src/common/ani_helper/type_converter.cpp", "src/common/file_helper/fd_guard.cpp", "src/mod_fs/fs_utils.cpp", "src/mod_securitylabel/ani/bind_function_class.cpp", "src/mod_securitylabel/ani/securitylabel_ani.cpp", "src/mod_securitylabel/securitylabel_core.cpp", ] deps = [ ":ohos_file_securityLabel_abc_etc", "${file_api_path}/interfaces/kits/rust:rust_file", "${utils_path}/filemgmt_libfs:filemgmt_libfs", "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", ] external_deps = [ "bounds_checking_function:libsec_shared", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "libuv:uv", "runtime_core:ani", "runtime_core:ani_helpers", "runtime_core:libarkruntime", ] use_exceptions = true branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } output_extension = "so" subsystem_name = "filemanagement" part_name = "file_api" } generate_static_abc("ohos_file_securityLabel_abc") { base_url = "./src/mod_securitylabel/ani/ets" files = [ "./src/mod_securitylabel/ani/ets/@ohos.file.securityLabel.ets" ] is_boot_abc = "True" device_dst_file = "/system/framework/ohos_file_securityLabel_abc.abc" } ohos_prebuilt_etc("ohos_file_securityLabel_abc_etc") { source = "$target_out_dir/ohos_file_securityLabel_abc.abc" module_install_dir = "framework" subsystem_name = "filemanagement" part_name = "file_api" deps = [ ":ohos_file_securityLabel_abc" ] } ohos_shared_library("ani_file_environment") { public_configs = [ ":ani_config" ] include_dirs = [ "src/mod_environment/ani", "src/mod_environment", ] sources = [ "src/common/ani_helper/ani_signature.cpp", "src/common/ani_helper/error_handler.cpp", "src/common/ani_helper/type_converter.cpp", "src/common/file_helper/fd_guard.cpp", "src/mod_environment/ani/bind_function_class.cpp", "src/mod_environment/ani/environment_ani.cpp", "src/mod_environment/environment_core.cpp", "src/mod_fs/fs_utils.cpp", ] deps = [ ":ohos_file_environment_abc_etc", "${file_api_path}/interfaces/kits/rust:rust_file", "${utils_path}/filemgmt_libfs:filemgmt_libfs", "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", ] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "bounds_checking_function:libsec_shared", "eventhandler:libeventhandler", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", "libuv:uv", "openssl:libcrypto_shared", "os_account:os_account_innerkits", "runtime_core:ani", "runtime_core:ani_helpers", "runtime_core:libarkruntime", ] use_exceptions = true branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } output_extension = "so" subsystem_name = "filemanagement" part_name = "file_api" } generate_static_abc("ohos_file_environment_abc") { base_url = "./src/mod_environment/ani/ets" files = [ "./src/mod_environment/ani/ets/@ohos.file.environment.ets" ] is_boot_abc = "True" device_dst_file = "/system/framework/ohos_file_environment_abc.abc" } ohos_prebuilt_etc("ohos_file_environment_abc_etc") { source = "$target_out_dir/ohos_file_environment_abc.abc" module_install_dir = "framework" subsystem_name = "filemanagement" part_name = "file_api" deps = [ ":ohos_file_environment_abc" ] } ohos_shared_library("ani_file_statvfs") { public_configs = [ ":ani_config" ] include_dirs = [ "src/mod_statvfs/ani", "src/mod_statvfs", ] sources = [ "src/common/ani_helper/ani_signature.cpp", "src/common/ani_helper/error_handler.cpp", "src/common/ani_helper/type_converter.cpp", "src/common/file_helper/fd_guard.cpp", "src/mod_fs/fs_utils.cpp", "src/mod_statvfs/ani/bind_function_class.cpp", "src/mod_statvfs/ani/statvfs_ani.cpp", "src/mod_statvfs/statvfs_core.cpp", ] deps = [ ":ohos_file_statvfs_abc_etc", "${file_api_path}/interfaces/kits/rust:rust_file", "${utils_path}/filemgmt_libfs:filemgmt_libfs", "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", ] external_deps = [ "bounds_checking_function:libsec_shared", "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", "libuv:uv", "runtime_core:ani", "runtime_core:ani_helpers", "runtime_core:libarkruntime", ] use_exceptions = true cflags = [ "-fdata-sections", "-ffunction-sections", "-Oz", ] cflags_cc = [ "-fvisibility-inlines-hidden", "-Oz", ] branch_protector_ret = "pac_ret" sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } output_extension = "so" subsystem_name = "filemanagement" part_name = "file_api" } generate_static_abc("ohos_file_statvfs_abc") { base_url = "./src/mod_statvfs/ani/ets" files = [ "./src/mod_statvfs/ani/ets/@ohos.file.statvfs.ets" ] is_boot_abc = "True" device_dst_file = "/system/framework/ohos_file_statvfs_abc.abc" } ohos_prebuilt_etc("ohos_file_statvfs_abc_etc") { source = "$target_out_dir/ohos_file_statvfs_abc.abc" module_install_dir = "framework" subsystem_name = "filemanagement" part_name = "file_api" deps = [ ":ohos_file_statvfs_abc" ] }