• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//build/config/components/idl_tool/idl.gni")
15import("//build/ohos.gni")
16import("../../services/engine/engine_sa.gni")
17
18idl_interface_sources = [ "${target_gen_dir}/update_service_stub.cpp" ]
19
20idl_include = [
21  "${target_gen_dir}",
22  "${target_gen_dir}/callback",
23]
24
25idl_gen_interface("update_service_interface") {
26  src_idl = rebase_path("IUpdateService.idl")
27  sources_callback = [ "callback/IUpdateCallback.idl" ]
28  dst_file = string_join(",", idl_interface_sources)
29  log_domainid = "0xD002E00"
30  log_tag = "UPDATE_SERVICE_KITS"
31}
32
33ohos_prebuilt_etc("dupdate_config.json") {
34  source = "$update_service_dupdate_config_path"
35  relative_install_dir = "update"
36  install_images = [
37    "updater",
38    "system",
39  ]
40  part_name = "$updateengine_part_name"
41  subsystem_name = "updater"
42}
43
44ohos_prebuilt_etc("updater_sa.cfg") {
45  source = "$update_service_updater_sa_cfg_path"
46  relative_install_dir = "init"
47  part_name = "$updateengine_part_name"
48  subsystem_name = "updater"
49}
50
51ohos_shared_library("$updateengine_library_name") {
52  sanitize = {
53    boundary_sanitize = true
54    cfi = true
55    cfi_cross_dso = true
56    debug = false
57    blocklist = "./cfi_blocklist.txt"
58  }
59  shlib_type = "sa"
60  include_dirs = sa_include_dirs
61  include_dirs += idl_include
62  sources = sa_sources
63  output_values = get_target_outputs(":update_service_interface")
64  sources += filter_include(output_values, [ "*_stub.cpp" ])
65  deps = sa_deps
66  deps += [ ":update_service_interface" ]
67  external_deps = sa_external_deps
68  part_name = "$updateengine_part_name"
69  subsystem_name = "updater"
70  defines = sa_defines
71  cflags = sa_cflags
72}
73