• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//base/startup/init/begetd.gni")
15import("//build/ohos.gni")
16
17config("exported_header_files") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "./include",
21    "//base/customization/config_policy/interfaces/inner_api/include",
22  ]
23}
24
25ohos_static_library("sandbox") {
26  sources = [
27    "sandbox.c",
28    "sandbox_namespace.c",
29  ]
30  public_configs = [ ":exported_header_files" ]
31  include_dirs = [
32    "//third_party/bounds_checking_function/include",
33    "//third_party/cJSON",
34    "//base/startup/init/services/include",
35    "//base/startup/init/interfaces/innerkits/include",
36  ]
37  if (target_cpu == "arm64") {
38    defines = [ "SUPPORT_64BIT" ]
39  }
40  deps = [
41    ":chipset-sandbox.json",
42    ":system-sandbox.json",
43    "//base/customization/config_policy/frameworks/config_policy:configpolicy_util",
44    "//base/startup/init/services/utils:libinit_utils",
45  ]
46  part_name = "init"
47  subsystem_name = "startup"
48}
49
50ohos_prebuilt_etc("system-sandbox.json") {
51  if (target_cpu == "arm64") {
52    source = "system-sandbox64.json"
53  } else {
54    source = "system-sandbox.json"
55  }
56  output = "//base/startup/init/services/sandbox/system-sandbox.json"
57  part_name = "init"
58  subsystem_name = "startup"
59  module_install_dir = "etc/sandbox"
60}
61
62ohos_prebuilt_etc("chipset-sandbox.json") {
63  if (target_cpu == "arm64") {
64    source = "chipset-sandbox64.json"
65  } else {
66    source = "chipset-sandbox.json"
67  }
68  output = "//base/startup/init/services/sandbox/chipset-sandbox.json"
69  part_name = "init"
70  subsystem_name = "startup"
71  module_install_dir = "etc/sandbox"
72}
73