feat: don't apply module_swith on configs of config

optimize the public config template

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I0275b9a945ee87ca7893f8da6f30f9f5f65fa9ae
This commit is contained in:
Caoruihong 2021-07-27 16:46:30 +08:00
parent 875c46290b
commit f3beb4b273
2 changed files with 10 additions and 12 deletions

View File

@ -29,9 +29,7 @@
import("//kernel/liteos_a/liteos.gni")
module_switch = defined(LOSCFG_DRIVERS)
group("drivers") {
if (module_switch) {
deps = [
"block/disk",
"char/bch",
@ -41,7 +39,6 @@ group("drivers") {
"char/video",
"mtd/multi_partition",
]
}
}
config("public") {

View File

@ -49,6 +49,7 @@ template("config") {
config(target_name) {
if (defined(invoker.module_switch) && !invoker.module_switch && target_name == "public") {
not_needed(invoker, "*")
forward_variables_from(invoker, [ "configs" ])
} else {
forward_variables_from(invoker, "*")
}