From 31627faa4e919556b801399d550fe7216865e3dc Mon Sep 17 00:00:00 2001 From: zhuoli Date: Tue, 18 Oct 2022 16:59:06 +0800 Subject: [PATCH] fixed 3ec72dc from https://gitee.com/zhuoli72/ark_ts2abc/pulls/602 Fix duplicate build target on linux/mac of es2abc on host Signed-off-by: zhuoli Change-Id: If2ccd097b8a6c2c21790f893ca978fce5e757d9c --- es2panda/BUILD.gn | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/es2panda/BUILD.gn b/es2panda/BUILD.gn index 075eedd3e8..853d2a3494 100644 --- a/es2panda/BUILD.gn +++ b/es2panda/BUILD.gn @@ -515,15 +515,28 @@ if (is_mac) { } } -ohos_copy("build_es2abc_for_hap") { - deps = [ ":es2panda(${host_toolchain})" ] - es2abc_root_out_dir = - get_label_info(":es2panda_build($host_toolchain)", "root_out_dir") - es2abc_target_out_dir = - get_label_info(":es2panda_build($host_toolchain)", "target_out_dir") - - sources = [ "${es2abc_root_out_dir}/arkcompiler/ets_frontend/es2abc" ] - outputs = [ "${es2abc_target_out_dir}/build/bin/es2abc" ] +if (is_linux) { + ohos_copy("build_es2abc_for_hap") { + deps = [ ":es2panda(${host_toolchain})" ] + es2abc_root_out_dir = + get_label_info(":es2panda_build($host_toolchain)", "root_out_dir") + es2abc_target_out_dir = + get_label_info(":es2panda_build($host_toolchain)", "target_out_dir") + + sources = [ "${es2abc_root_out_dir}/arkcompiler/ets_frontend/es2abc" ] + outputs = [ "${es2abc_target_out_dir}/build/bin/es2abc" ] + } +} else if (is_mac) { + ohos_copy("build_es2abc_for_hap") { + deps = [ ":es2panda(${host_toolchain})" ] + es2abc_root_out_dir = + get_label_info(":es2panda_build($host_toolchain)", "root_out_dir") + es2abc_target_out_dir = + get_label_info(":es2panda_build($host_toolchain)", "target_out_dir") + + sources = [ "${es2abc_root_out_dir}/arkcompiler/ets_frontend/es2abc" ] + outputs = [ "${es2abc_target_out_dir}/build-mac/bin/es2abc" ] + } } group("es2panda_build") { -- Gitee