1# Copyright (c) 2021-2023 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/ohos.gni")
15
16group("common_target") {
17  deps = [ ":libappexecfwk_common" ]
18}
19
20config("appexecfwk_common_config") {
21  include_dirs = [
22    "log/include",
23    "utils/include",
24  ]
25}
26
27config("bundle_all_dependent_config") {
28  include_dirs = [ "log/include" ]
29}
30
31ohos_shared_library("libappexecfwk_common") {
32  branch_protector_ret = "pac_ret"
33  sources = [
34    "log/src/app_log_wrapper.cpp",
35    "utils/src/bundle_file_util.cpp",
36    "utils/src/bundle_memory_guard.cpp",
37  ]
38
39  defines = [
40    "APP_LOG_TAG = \"BMS\"",
41    "LOG_DOMAIN = 0xD001120",
42  ]
43  cflags = [ "-Os" ]
44  cflags_cc = [ "-Os" ]
45  if (use_musl) {
46    if (musl_use_jemalloc && musl_use_jemalloc_dfx_intf) {
47      defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ]
48    }
49  }
50
51  public_configs = [ ":appexecfwk_common_config" ]
52
53  all_dependent_configs = [ ":bundle_all_dependent_config" ]
54
55  external_deps = [
56    "c_utils:utils",
57    "hilog:libhilog",
58  ]
59
60  subsystem_name = "bundlemanager"
61  innerapi_tags = [ "platformsdk" ]
62  part_name = "bundle_framework"
63}
64