15bebb993Sopenharmony_ci# Copyright (c) 2022-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("//foundation/filemanagement/file_api/file_api.gni")
165bebb993Sopenharmony_ci
175bebb993Sopenharmony_ciconfig("remote_uri_config") {
185bebb993Sopenharmony_ci  visibility = [ ":*" ]
195bebb993Sopenharmony_ci  include_dirs = [
205bebb993Sopenharmony_ci    "include",
215bebb993Sopenharmony_ci    "remote_uri",
225bebb993Sopenharmony_ci  ]
235bebb993Sopenharmony_ci}
245bebb993Sopenharmony_ci
255bebb993Sopenharmony_ciconfig("task_signal_config") {
265bebb993Sopenharmony_ci  visibility = [ ":*" ]
275bebb993Sopenharmony_ci  include_dirs = [
285bebb993Sopenharmony_ci    "include",
295bebb993Sopenharmony_ci    "task_signal",
305bebb993Sopenharmony_ci  ]
315bebb993Sopenharmony_ci}
325bebb993Sopenharmony_ci
335bebb993Sopenharmony_ciohos_shared_library("remote_uri_native") {
345bebb993Sopenharmony_ci  if (!use_mingw_win && !use_mac) {
355bebb993Sopenharmony_ci    cflags = [
365bebb993Sopenharmony_ci      "-fdata-sections",
375bebb993Sopenharmony_ci      "-ffunction-sections",
385bebb993Sopenharmony_ci      "-Oz",
395bebb993Sopenharmony_ci    ]
405bebb993Sopenharmony_ci    cflags_cc = [
415bebb993Sopenharmony_ci      "-fvisibility-inlines-hidden",
425bebb993Sopenharmony_ci      "-Oz",
435bebb993Sopenharmony_ci    ]
445bebb993Sopenharmony_ci    branch_protector_ret = "pac_ret"
455bebb993Sopenharmony_ci    sanitize = {
465bebb993Sopenharmony_ci      integer_overflow = true
475bebb993Sopenharmony_ci      ubsan = true
485bebb993Sopenharmony_ci      boundary_sanitize = true
495bebb993Sopenharmony_ci      cfi = true
505bebb993Sopenharmony_ci      cfi_cross_dso = true
515bebb993Sopenharmony_ci      debug = false
525bebb993Sopenharmony_ci    }
535bebb993Sopenharmony_ci  }
545bebb993Sopenharmony_ci
555bebb993Sopenharmony_ci  sources = [ "remote_uri/remote_uri.cpp" ]
565bebb993Sopenharmony_ci
575bebb993Sopenharmony_ci  public_configs = [ ":remote_uri_config" ]
585bebb993Sopenharmony_ci
595bebb993Sopenharmony_ci  external_deps = [
605bebb993Sopenharmony_ci    "ability_base:zuri",
615bebb993Sopenharmony_ci    "access_token:libaccesstoken_sdk",
625bebb993Sopenharmony_ci    "c_utils:utils",
635bebb993Sopenharmony_ci    "ipc:ipc_core",
645bebb993Sopenharmony_ci  ]
655bebb993Sopenharmony_ci
665bebb993Sopenharmony_ci  innerapi_tags = [ "platformsdk" ]
675bebb993Sopenharmony_ci  part_name = "file_api"
685bebb993Sopenharmony_ci  subsystem_name = "filemanagement"
695bebb993Sopenharmony_ci}
705bebb993Sopenharmony_ci
715bebb993Sopenharmony_ciohos_shared_library("task_signal_native") {
725bebb993Sopenharmony_ci  if (!use_mingw_win && !use_mac) {
735bebb993Sopenharmony_ci    cflags = [
745bebb993Sopenharmony_ci      "-fdata-sections",
755bebb993Sopenharmony_ci      "-ffunction-sections",
765bebb993Sopenharmony_ci      "-Oz",
775bebb993Sopenharmony_ci    ]
785bebb993Sopenharmony_ci    cflags_cc = [
795bebb993Sopenharmony_ci      "-fvisibility-inlines-hidden",
805bebb993Sopenharmony_ci      "-Oz",
815bebb993Sopenharmony_ci    ]
825bebb993Sopenharmony_ci    branch_protector_ret = "pac_ret"
835bebb993Sopenharmony_ci    sanitize = {
845bebb993Sopenharmony_ci      integer_overflow = true
855bebb993Sopenharmony_ci      ubsan = true
865bebb993Sopenharmony_ci      boundary_sanitize = true
875bebb993Sopenharmony_ci      cfi = true
885bebb993Sopenharmony_ci      cfi_cross_dso = true
895bebb993Sopenharmony_ci      debug = false
905bebb993Sopenharmony_ci    }
915bebb993Sopenharmony_ci
925bebb993Sopenharmony_ci    sources = [ "task_signal/task_signal.cpp" ]
935bebb993Sopenharmony_ci
945bebb993Sopenharmony_ci    public_configs = [ ":task_signal_config" ]
955bebb993Sopenharmony_ci
965bebb993Sopenharmony_ci    deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog" ]
975bebb993Sopenharmony_ci
985bebb993Sopenharmony_ci    external_deps = [
995bebb993Sopenharmony_ci      "c_utils:utils",
1005bebb993Sopenharmony_ci      "dfs_service:distributed_file_daemon_kit_inner",
1015bebb993Sopenharmony_ci      "hilog:libhilog",
1025bebb993Sopenharmony_ci    ]
1035bebb993Sopenharmony_ci
1045bebb993Sopenharmony_ci    innerapi_tags = [ "platformsdk" ]
1055bebb993Sopenharmony_ci    part_name = "file_api"
1065bebb993Sopenharmony_ci    subsystem_name = "filemanagement"
1075bebb993Sopenharmony_ci  }
1085bebb993Sopenharmony_ci}
1095bebb993Sopenharmony_ci
1105bebb993Sopenharmony_ciconfig("environment_config") {
1115bebb993Sopenharmony_ci  visibility = [ ":*" ]
1125bebb993Sopenharmony_ci  include_dirs = [ "environment" ]
1135bebb993Sopenharmony_ci}
1145bebb993Sopenharmony_ci
1155bebb993Sopenharmony_ciohos_shared_library("environment_native") {
1165bebb993Sopenharmony_ci  branch_protector_ret = "pac_ret"
1175bebb993Sopenharmony_ci  sanitize = {
1185bebb993Sopenharmony_ci    integer_overflow = true
1195bebb993Sopenharmony_ci    ubsan = true
1205bebb993Sopenharmony_ci    boundary_sanitize = true
1215bebb993Sopenharmony_ci    cfi = true
1225bebb993Sopenharmony_ci    cfi_cross_dso = true
1235bebb993Sopenharmony_ci    debug = false
1245bebb993Sopenharmony_ci  }
1255bebb993Sopenharmony_ci  cflags = [
1265bebb993Sopenharmony_ci    "-fdata-sections",
1275bebb993Sopenharmony_ci    "-ffunction-sections",
1285bebb993Sopenharmony_ci    "-Oz",
1295bebb993Sopenharmony_ci  ]
1305bebb993Sopenharmony_ci  cflags_cc = [
1315bebb993Sopenharmony_ci    "-fvisibility-inlines-hidden",
1325bebb993Sopenharmony_ci    "-Oz",
1335bebb993Sopenharmony_ci  ]
1345bebb993Sopenharmony_ci  sources = [ "environment/environment_native.cpp" ]
1355bebb993Sopenharmony_ci  public_configs = [ ":environment_config" ]
1365bebb993Sopenharmony_ci
1375bebb993Sopenharmony_ci  deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog" ]
1385bebb993Sopenharmony_ci
1395bebb993Sopenharmony_ci  external_deps = [
1405bebb993Sopenharmony_ci    "access_token:libaccesstoken_sdk",
1415bebb993Sopenharmony_ci    "access_token:libtokenid_sdk",
1425bebb993Sopenharmony_ci    "bounds_checking_function:libsec_shared",
1435bebb993Sopenharmony_ci    "hilog:libhilog",
1445bebb993Sopenharmony_ci    "init:libbegetutil",
1455bebb993Sopenharmony_ci    "ipc:ipc_core",
1465bebb993Sopenharmony_ci    "napi:ace_napi",
1475bebb993Sopenharmony_ci  ]
1485bebb993Sopenharmony_ci  innerapi_tags = [ "platformsdk" ]
1495bebb993Sopenharmony_ci  part_name = "file_api"
1505bebb993Sopenharmony_ci  subsystem_name = "filemanagement"
1515bebb993Sopenharmony_ci}
1525bebb993Sopenharmony_ci
1535bebb993Sopenharmony_ciconfig("fileio_config") {
1545bebb993Sopenharmony_ci  visibility = [ ":*" ]
1555bebb993Sopenharmony_ci  include_dirs = [ "fileio" ]
1565bebb993Sopenharmony_ci}
1575bebb993Sopenharmony_ci
1585bebb993Sopenharmony_ciohos_shared_library("fileio_native") {
1595bebb993Sopenharmony_ci  branch_protector_ret = "pac_ret"
1605bebb993Sopenharmony_ci  sanitize = {
1615bebb993Sopenharmony_ci    integer_overflow = true
1625bebb993Sopenharmony_ci    ubsan = true
1635bebb993Sopenharmony_ci    boundary_sanitize = true
1645bebb993Sopenharmony_ci    cfi = true
1655bebb993Sopenharmony_ci    cfi_cross_dso = true
1665bebb993Sopenharmony_ci    debug = false
1675bebb993Sopenharmony_ci  }
1685bebb993Sopenharmony_ci  cflags = [
1695bebb993Sopenharmony_ci    "-fvisibility=hidden",
1705bebb993Sopenharmony_ci    "-fdata-sections",
1715bebb993Sopenharmony_ci    "-ffunction-sections",
1725bebb993Sopenharmony_ci    "-Oz",
1735bebb993Sopenharmony_ci  ]
1745bebb993Sopenharmony_ci  cflags_cc = [
1755bebb993Sopenharmony_ci    "-fvisibility-inlines-hidden",
1765bebb993Sopenharmony_ci    "-Oz",
1775bebb993Sopenharmony_ci  ]
1785bebb993Sopenharmony_ci  sources = [ "fileio/fileio_native.cpp" ]
1795bebb993Sopenharmony_ci
1805bebb993Sopenharmony_ci  public_configs = [ ":fileio_config" ]
1815bebb993Sopenharmony_ci
1825bebb993Sopenharmony_ci  deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog" ]
1835bebb993Sopenharmony_ci
1845bebb993Sopenharmony_ci  external_deps = [
1855bebb993Sopenharmony_ci    "ability_base:zuri",
1865bebb993Sopenharmony_ci    "app_file_service:fileuri_native",
1875bebb993Sopenharmony_ci    "bounds_checking_function:libsec_shared",
1885bebb993Sopenharmony_ci    "hilog:libhilog",
1895bebb993Sopenharmony_ci  ]
1905bebb993Sopenharmony_ci  innerapi_tags = [ "platformsdk" ]
1915bebb993Sopenharmony_ci  part_name = "file_api"
1925bebb993Sopenharmony_ci  subsystem_name = "filemanagement"
1935bebb993Sopenharmony_ci}
1945bebb993Sopenharmony_ci
1955bebb993Sopenharmony_cigroup("build_kits_native") {
1965bebb993Sopenharmony_ci  deps = [
1975bebb993Sopenharmony_ci    ":environment_native",
1985bebb993Sopenharmony_ci    ":fileio_native",
1995bebb993Sopenharmony_ci    ":remote_uri_native",
2005bebb993Sopenharmony_ci    ":task_signal_native",
2015bebb993Sopenharmony_ci  ]
2025bebb993Sopenharmony_ci}
203