From b82993b889e9b04ff2d99a5a7b2b6fad676f48f5 Mon Sep 17 00:00:00 2001 From: wanzixuan Date: Thu, 7 Aug 2025 20:36:52 +0800 Subject: [PATCH] Add global deps for taihe copy target Signed-off-by: wanzixuan --- ohos/taihe_idl/taihe.gni | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/ohos/taihe_idl/taihe.gni b/ohos/taihe_idl/taihe.gni index df1bae4793..2c6e8a7c13 100644 --- a/ohos/taihe_idl/taihe.gni +++ b/ohos/taihe_idl/taihe.gni @@ -12,6 +12,8 @@ # limitations under the License. import("//build/ohos.gni") +taihe_copy_array = [] + declare_args() { taihe_file_path = "$root_out_dir/taihe" taihe_toolchain_path = "//prebuilts/taihe/ohos/linux-x86_64/taihe" @@ -25,7 +27,8 @@ template("ohos_taihe") { action(target_name) { script = "${taihe_toolchain_path}/bin/taihec" args = [ - rebase_path("${taihe_toolchain_path}/lib/taihe/stdlib/taihe.platform.ani.taihe"), + rebase_path( + "${taihe_toolchain_path}/lib/taihe/stdlib/taihe.platform.ani.taihe"), "-I", rebase_path("$taihe_file_path", root_build_dir), "-O", @@ -34,9 +37,24 @@ template("ohos_taihe") { "cpp-author", "ani-bridge", ] - deps = invoker.deps + + if (defined(invoker.module_prefix)) { + args += [ "-Carkts:module-prefix=${invoker.module_prefix}" ] + } + + if (defined(invoker.path_prefix)) { + args += [ "-Carkts:path-prefix=${invoker.path_prefix}" ] + } + + deps = taihe_copy_array + if (defined(invoker.deps)) { + deps += invoker.deps + } + outputs = [ "$taihe_generated_file_path/src/taihe.platform.ani.abi.c" ] - outputs += invoker.outputs + if (defined(invoker.outputs)) { + outputs += invoker.outputs + } } } -- Gitee