From 5dc54a8ac983b8bd59aba1dcd410364b108e411b Mon Sep 17 00:00:00 2001 From: yangming_ha Date: Thu, 15 Jul 2021 23:09:45 -0700 Subject: [PATCH] split product target from ohos Signed-off-by: yangming_ha --- BUILD.gn | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index d9e5c54..a4a53a3 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -80,7 +80,8 @@ group("ohos") { # Step 6.1.2: Add valid component for compiling. # Skip kernel target for userspace only scenario. if (!ohos_build_userspace_only || - (ohos_build_userspace_only && subsystem_name != "kernel" && subsystem_name != "vendor")) { + (ohos_build_userspace_only && subsystem_name != "kernel" && + subsystem_name != "vendor")) { foreach(component_target, component.targets) { deps += [ component_target ] } @@ -89,21 +90,26 @@ group("ohos") { } } } + # Skip device target for userspace only scenario. if (!ohos_build_userspace_only) { # Step 7: Add device and product target by default. - deps += [ - "${device_path}/../" - ] + deps += [ "${device_path}/../" ] } - deps += [ - "${product_path}" - ] } else { deps += string_split(ohos_build_target, "&&") } } +group("product") { + deps = [] + + # build product, skip build single component scenario. + if (ohos_build_target == "") { + deps += [ "${product_path}" ] + } +} + group("ndk") { # Add native API targets. deps = [] -- GitLab