startup_init/watchdog/BUILD.gn
chengjinsong2 61330688db 回退编译选项-fno-common
Signed-off-by: chengjinsong2 <chengjinsong2@huawei.com>
2023-01-16 17:21:33 +08:00

62 lines
1.7 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/startup/init/services/log:init_log",
"//third_party/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",
"//third_party/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" ]
}
}