From c68f63c9243c2476edf03e9a9add1835abec1603 Mon Sep 17 00:00:00 2001 From: yinchuang Date: Thu, 18 Aug 2022 09:51:41 +0800 Subject: [PATCH] Modify ts2abc_src to improve incremental compilation Issue:https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/I5MU7N Signed-off-by: yinchuang Signed-off-by: yinchuang --- ts2panda/BUILD.gn | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ts2panda/BUILD.gn b/ts2panda/BUILD.gn index 815bcb1def..1424e00fcd 100755 --- a/ts2panda/BUILD.gn +++ b/ts2panda/BUILD.gn @@ -17,12 +17,24 @@ import("//build/config/clang/clang.gni") import("//build/ohos.gni") src_dir = target_out_dir + "/src" +src_dir_full_path = rebase_path("${ts2abc_root}/src") +arguments = [ "-c" ] +arguments += [ "ls ${src_dir_full_path} " ] +src_files = exec_script("/bin/sh", arguments, "list lines") + +foreach(file, src_files) { + ohos_copy("ts2abc_src_${file}") { + sources = [ "${ts2abc_root}/src/${file}" ] + outputs = [ "${src_dir}/${file}" ] + module_install_name = "" + } +} -ohos_copy("ts2abc_src") { - sources = [ "${ts2abc_root}/src" ] - - outputs = [ src_dir ] - module_install_name = "" +group("ts2abc_src") { + deps = [] + foreach(file, src_files) { + deps += [ ":ts2abc_src_${file}" ] + } } ohos_copy("node_modules") { -- Gitee