lwx1281857 9fd7a70ce3 Description:Code optimization
Feature or Bugfix:Bugfix
Binary Source:No

Signed-off-by: lwx1281857 <linnanmu@h-partners.com>
2024-10-15 21:16:42 +08:00

63 lines
1.8 KiB
Plaintext

# Copyright (c) 2021-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.
if (defined(ohos_lite)) {
executable("watchdog_service") {
sources = [
"//base/startup/init/services/log/init_commlog.c",
"//base/startup/init/watchdog/init_watchdog.c",
]
deps = [
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//base/startup/init/services/log:init_log",
]
external_deps = [ "bounds_checking_function:libsec_static" ]
defines = [
"_GNU_SOURCE",
"OHOS_LITE_WATCHDOG",
]
if (ohos_kernel_type == "linux") {
defines += [ "LINUX_WATCHDOG" ]
}
}
} else {
import("//build/ohos.gni")
ohos_executable("watchdog_service") {
sources = [
"//base/startup/init/services/log/init_commlog.c",
"init_watchdog.c",
]
deps = [ "//base/startup/init/services/log:init_log" ]
external_deps = [ "bounds_checking_function:libsec_shared" ]
defines = [ "LINUX_WATCHDOG" ]
defines += [ "_GNU_SOURCE" ]
install_enable = true
part_name = "init"
subsystem_name = "startup"
}
}
group("watchdog") {
if (defined(ohos_lite)) {
if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") {
deps = [ ":watchdog_service" ]
} else {
deps = []
}
} else {
deps = [ ":watchdog_service" ]
}
}