diff --git a/BUILD.gn b/BUILD.gn index d9e5c5458da1ce6cc6715f5b538a4077d84ba118..a4a53a35adb8224569f7661fd56a3c4c8d7c3d72 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 = []