• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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.
13import("//base/startup/init/begetd.gni")
14import("//build/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("//build/ohos/taihe_idl/taihe.gni")
17
18copy_taihe_idl("copy_systemParamterEnhance") {
19  sources = [ "idl/ohos.systemParameterEnhance.taihe" ]
20}
21subsystem_name = "startup"
22part_name = "init"
23taihe_generated_file_path_systemParameterEnhance = "$taihe_file_path/out/$subsystem_name/$part_name/systemParameterEnhance"
24
25ohos_taihe("run_taihe") {
26  taihe_generated_file_path = "${taihe_generated_file_path_systemParameterEnhance}"
27  deps = [ ":copy_systemParamterEnhance" ]
28  outputs = [
29    "$taihe_generated_file_path/src/ohos.systemParameterEnhance.ani.cpp",
30    "$taihe_generated_file_path/src/ohos.systemParameterEnhance.abi.c",
31  ]
32}
33
34taihe_shared_library("systemParameterEnhance_taihe_native") {
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39  }
40  taihe_generated_file_path = "${taihe_generated_file_path_systemParameterEnhance}"
41  part_name = "$part_name"
42  subsystem_name = "$subsystem_name"
43  sources = get_target_outputs(":run_taihe")
44  sources += [
45    "src/ani_constructor.cpp",
46    "src/ohos.systemParameterEnhance.impl.cpp",
47  ]
48  deps = [
49    ":run_taihe",
50    "${init_innerkits_path}:libbeget_proxy",
51    "${init_innerkits_path}:libbegetutil",
52  ]
53  external_deps = [
54    "bounds_checking_function:libsec_shared",
55  ]
56}
57
58generate_static_abc("systemParameterEnhance") {
59  base_url = "$taihe_generated_file_path_systemParameterEnhance"
60  files = [ "$taihe_generated_file_path_systemParameterEnhance/@ohos.systemParameterEnhance.ets" ]
61  is_boot_abc = "True"
62  device_dst_file = "/system/framework/systemParameterEnhance.abc"
63  dependencies = [ ":run_taihe" ]
64}
65
66ohos_prebuilt_etc("systemParamterEnhance_etc") {
67  source = "$target_out_dir/systemParameterEnhance.abc"
68  module_install_dir = "framework"
69  part_name = "$part_name"
70  subsystem_name = "$subsystem_name"
71  deps = [ ":systemParameterEnhance" ]
72}
73