diff --git a/interfaces/innerkits/syscap/BUILD.gn b/interfaces/innerkits/syscap/BUILD.gn new file mode 100755 index 000000000..0b537f43e --- /dev/null +++ b/interfaces/innerkits/syscap/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") + +config("syscap_config") { + include_dirs = [ "../include" ] +} + +ohos_shared_library("syscap") { + sources = [ "init_syscap.c" ] + + include_dirs = [ + "../include", + "../../../services/include/param", + ] + deps = [ + "../../../services/log:init_log", + "../../../services/param:param_client", + "//third_party/bounds_checking_function:libsec_shared", + ] + + public_configs = [ ":syscap_config" ] + part_name = "init" + install_images = [ "system" ] +} diff --git a/services/param/BUILD.gn b/services/param/BUILD.gn old mode 100644 new mode 100755 index dd2edbfa7..d35275b28 --- a/services/param/BUILD.gn +++ b/services/param/BUILD.gn @@ -115,10 +115,10 @@ ohos_shared_library("param_client") { } } - deps = [ - "//base/startup/init_lite/services/log:agent_log", - "//third_party/bounds_checking_function:libsec_static", - ] + deps = [ "//third_party/bounds_checking_function:libsec_static" ] + if (is_standard_system) { + deps += [ "//base/startup/init_lite/services/log:agent_log" ] + } install_images = [ "system", "updater", diff --git a/services/utils/BUILD.gn b/services/utils/BUILD.gn old mode 100644 new mode 100755 index bf6f85f4b..86acca7fc --- a/services/utils/BUILD.gn +++ b/services/utils/BUILD.gn @@ -10,6 +10,20 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import("//build/ohos.gni") + +ohos_static_library("libinit_utils") { + sources = [ "init_utils.c" ] + include_dirs = [ + "//third_party/bounds_checking_function/include", + "//base/startup/init_lite/services/log", + "//base/startup/init_lite/interfaces/innerkits/include", + "//base/startup/init_lite/services/include", + ] + deps = [ "//third_party/bounds_checking_function:libsec_static" ] + defines = [ "_GNU_SOURCE" ] + part_name = "init" +} if (defined(ohos_lite)) { static_library("libinit_tools") { @@ -29,8 +43,6 @@ if (defined(ohos_lite)) { defines = [ "_GNU_SOURCE" ] } } else { - import("//build/ohos.gni") - ohos_static_library("libinit_tools") { sources = [ "//base/startup/init_lite/services/utils/init_hashmap.c", @@ -48,19 +60,4 @@ if (defined(ohos_lite)) { defines = [ "_GNU_SOURCE" ] part_name = "init" } - - ohos_static_library("libinit_utils") { - sources = [ "init_utils.c" ] - - include_dirs = [ - "//third_party/bounds_checking_function/include", - "//base/startup/init_lite/services/log", - "//base/startup/init_lite/interfaces/innerkits/include", - "//base/startup/init_lite/services/include", - ] - - deps = [ "//third_party/bounds_checking_function:libsec_static" ] - defines = [ "_GNU_SOURCE" ] - part_name = "init" - } }