From ec4055112b6b2fb21694d7bbb1093786d45e0e63 Mon Sep 17 00:00:00 2001 From: zzz701 Date: Tue, 19 Aug 2025 18:23:06 +0800 Subject: [PATCH] =?UTF-8?q?NDK=E6=89=93=E5=8C=85=E8=A3=81=E5=89=AA1.2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20Signed-off-by:=20zzz701=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ohos/ndk/BUILD.gn | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ohos/ndk/BUILD.gn b/ohos/ndk/BUILD.gn index 7fd706e408..dbbaf9b3ba 100755 --- a/ohos/ndk/BUILD.gn +++ b/ohos/ndk/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# Copyright (c) 2021-2025 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 @@ -72,8 +72,29 @@ if (!use_current_sdk) { } } + if (!defined(ext_ndk_config_file) || ext_ndk_config_file == "") { + action_with_pydeps("_clean_ndk_ani") { + deps = [ ":_collect_ndk_syscap" ] + script = "//interface/sdk_c/build-tools/clean_ndk_ani.py" + outputs = [ "${ndk_os_irrelevant_out_dir}/clean_ndk_ani.json" ] + _native_syscap_config_file = + "${ndk_os_irrelevant_out_dir}/nativeapi_syscap_config.json" + args = [ + "--ndk-header-path", + rebase_path("$ndk_headers_out_dir", root_build_dir), + "--system-capability-header-config", + rebase_path(_native_syscap_config_file, root_build_dir), + ] + } + } + group("all_ndk_targets") { deps = [ ":_collect_ndk_syscap" ] + if (!defined(ext_ndk_config_file) || ext_ndk_config_file == "") { + if (!sdk_build_arkts) { + deps += [ ":_clean_ndk_ani" ] + } + } } group("ndk_notice") { -- Gitee