From abe07382558f2d6169d67a2edce1efc19f150922 Mon Sep 17 00:00:00 2001 From: chenqy930 Date: Mon, 11 Jul 2022 16:19:42 +0800 Subject: [PATCH] Switch component ark_ts2abc to arkcompiler_ets_frontend Signed-off-by: chenqy930 --- bundle.json | 6 +++--- testTs/config.py | 2 +- ts2panda/BUILD.gn | 4 ++-- ts2panda/scripts/npm-install.sh | 2 +- ts2panda/scripts/run_tests.py | 2 +- ts2panda/tests/BUILD.gn | 2 +- ts2panda/ts2abc/BUILD.gn | 2 +- ts2panda/ts2abc/tests/BUILD.gn | 4 ++-- ts2panda/ts2abc/tests/type_adapter_test/BUILD.gn | 8 ++++---- ts2panda/ts2abc_config.gni | 13 ++++++++----- 10 files changed, 24 insertions(+), 21 deletions(-) diff --git a/bundle.json b/bundle.json index 36f2d2379d..e881bff9c3 100644 --- a/bundle.json +++ b/bundle.json @@ -1,10 +1,10 @@ { - "name": "@ohos/ark_ts2abc", + "name": "@ohos/arkcompiler_ets_frontend", "description": "支持应用TS/JS语言代码的编译,行为符合ArkUI框架需要的Strict模式的ES2015标准", "version": "3.1", "license": "Apache V2", "component": { - "name": "ark_frontend_tool", + "name": "ark_ts2abc", "subsystem": "ark", "syscap": [], "features": [], @@ -23,4 +23,4 @@ "test": [] } } -} \ No newline at end of file +} diff --git a/testTs/config.py b/testTs/config.py index 3412291c9d..14ec255458 100644 --- a/testTs/config.py +++ b/testTs/config.py @@ -34,7 +34,7 @@ IMPORT_FILE_PATH = os.path.join("testTs", "import_tests.json") CUR_FILE_DIR = os.path.dirname(__file__) CODE_ROOT = os.path.abspath(os.path.join(CUR_FILE_DIR, "../../..")) ARK_DIR = f"{CODE_ROOT}/out/hispark_taurus/clang_x64/ark/ark" -WORK_PATH = f'{CODE_ROOT}/ark/ts2abc' +WORK_PATH = f'{CODE_ROOT}/arkcompiler/ets_frontend' DEFAULT_ARK_FRONTEND_TOOL = os.path.join(ARK_DIR, "build", "src", "index.js") diff --git a/ts2panda/BUILD.gn b/ts2panda/BUILD.gn index 6ef40ce0df..b51922857a 100755 --- a/ts2panda/BUILD.gn +++ b/ts2panda/BUILD.gn @@ -11,8 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//ark/runtime_core/ark_config.gni") -import("//ark/ts2abc/ts2panda/ts2abc_config.gni") +import("//arkcompiler/ets_frontend/ts2panda/ts2abc_config.gni") +import("//arkcompiler/runtime_core/ark_config.gni") import("//build/config/clang/clang.gni") import("//build/ohos.gni") diff --git a/ts2panda/scripts/npm-install.sh b/ts2panda/scripts/npm-install.sh index f669e0589b..479a7c40a7 100755 --- a/ts2panda/scripts/npm-install.sh +++ b/ts2panda/scripts/npm-install.sh @@ -37,4 +37,4 @@ if [ -d "${code_dir}/prebuilts/build-tools/common/ts2abc" ]; then fi mkdir -p ${code_dir}/prebuilts/build-tools/common/ts2abc -/bin/cp -rf ${code_dir}/ark/ts2abc/ts2panda/node_modules ${code_dir}/prebuilts/build-tools/common/ts2abc/ || echo "skip copying due to other thread" +/bin/cp -rf ${code_dir}/arkcompiler/ets_frontend/ts2panda/node_modules ${code_dir}/prebuilts/build-tools/common/ts2abc/ || echo "skip copying due to other thread" diff --git a/ts2panda/scripts/run_tests.py b/ts2panda/scripts/run_tests.py index ed38d57f99..5ef38c453a 100755 --- a/ts2panda/scripts/run_tests.py +++ b/ts2panda/scripts/run_tests.py @@ -27,7 +27,7 @@ CUR_FILE_DIR = os.path.dirname(__file__) TS2PANDA_DIR = os.path.abspath(os.path.join(CUR_FILE_DIR, "..")) CODE_ROOT = os.path.abspath(os.path.join(TS2PANDA_DIR, "../../..")) DEFAULT_TARGET_DIR = os.path.join( - CODE_ROOT, "out/hispark_taurus/clang_x64/obj/ark/ts2abc/ts2panda") + CODE_ROOT, "out/hispark_taurus/clang_x64/obj/arkcompiler/ets_frontend/ts2panda") DEFAULT_NODE_MODULE = os.path.join( CODE_ROOT, "prebuilts/build-tools/common/ts2abc/node_modules") diff --git a/ts2panda/tests/BUILD.gn b/ts2panda/tests/BUILD.gn index a08b272f0f..8f29fa2803 100644 --- a/ts2panda/tests/BUILD.gn +++ b/ts2panda/tests/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//ark/ts2abc/ts2panda/ts2abc_config.gni") +import("//arkcompiler/ets_frontend/ts2panda/ts2abc_config.gni") import("//build/config/clang/clang.gni") import("//build/ohos.gni") diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 54dffea651..7e723caf01 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. if (!defined(ark_independent_build)) { - import("//ark/runtime_core/ark_config.gni") + import("//arkcompiler/runtime_core/ark_config.gni") import("//build/ohos.gni") } else { import("//runtime_core/ark_config.gni") diff --git a/ts2panda/ts2abc/tests/BUILD.gn b/ts2panda/ts2abc/tests/BUILD.gn index f5b42a5d9d..0e58097477 100644 --- a/ts2panda/ts2abc/tests/BUILD.gn +++ b/ts2panda/ts2abc/tests/BUILD.gn @@ -11,8 +11,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//ark/runtime_core/ark_config.gni") -import("//ark/ts2abc/ts2panda/ts2abc_config.gni") +import("//arkcompiler/ets_frontend/ts2panda/ts2abc_config.gni") +import("//arkcompiler/runtime_core/ark_config.gni") # ts2abc_unittest_action("DebugLogTest") { # sources = [ "debuglog_test.cpp" ] diff --git a/ts2panda/ts2abc/tests/type_adapter_test/BUILD.gn b/ts2panda/ts2abc/tests/type_adapter_test/BUILD.gn index 117b88df4c..cf9904458c 100644 --- a/ts2panda/ts2abc/tests/type_adapter_test/BUILD.gn +++ b/ts2panda/ts2abc/tests/type_adapter_test/BUILD.gn @@ -11,16 +11,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//ark/runtime_core/ark_config.gni") -import("//ark/ts2abc/ts2panda/ts2abc_config.gni") +import("//arkcompiler/ets_frontend/ts2panda/ts2abc_config.gni") +import("//arkcompiler/runtime_core/ark_config.gni") ohos_executable("ts2abc_type_adapter_unit_tests") { sources = [ - "//ark/ts2abc/ts2panda/ts2abc/type_adapter.cpp", + "//arkcompiler/ets_frontend/ts2panda/ts2abc/type_adapter.cpp", "type_adapter_test.cpp", ] - configs = [ "//ark/ts2abc/ts2panda/ts2abc:ts2abc_config" ] + configs = [ "//arkcompiler/ets_frontend/ts2panda/ts2abc:ts2abc_config" ] cflags = [ "-Wno-c++20-designator", diff --git a/ts2panda/ts2abc_config.gni b/ts2panda/ts2abc_config.gni index e77f4a2714..99cc458e35 100755 --- a/ts2panda/ts2abc_config.gni +++ b/ts2panda/ts2abc_config.gni @@ -15,10 +15,10 @@ if (!defined(ark_independent_build)) { import("//build/ohos.gni") import("//build/test.gni") build_root = "//build" - ts2abc_root = "//ark/ts2abc/ts2panda" + ts2abc_root = "//arkcompiler/ets_frontend/ts2panda" } else { import("$build_root/ark.gni") - ts2abc_root = "//ts2abc/ts2panda" + ts2abc_root = "//arkcompiler/ets_frontend/ts2panda" } declare_args() { @@ -49,18 +49,21 @@ if (host_toolchain == buildtool_mac) { ts2abc_build_deps = [ "$ts2abc_root:ts2abc_build_mac($buildtool_mac)" ] ts2abc_build_path = get_label_info("$ts2abc_root:ts2abc_build_mac($buildtool_mac)", - "root_out_dir") + "/obj/ark/ts2abc/ts2panda/build-mac" + "root_out_dir") + + "/obj/arkcompiler/ets_frontend/ts2panda/build-mac" node_path = "${nodejs_dir}/node-v12.18.4-darwin-x64/bin/" } else if (host_toolchain == buildtool_win) { ts2abc_build_deps = [ "$ts2abc_root:ts2abc_build_win($buildtool_win)" ] ts2abc_build_path = get_label_info("$ts2abc_root:ts2abc_build_win($buildtool_win)", - "root_out_dir") + "/obj/ark/ts2abc/ts2panda/build_win" + "root_out_dir") + + "/obj/arkcompiler/ets_frontend/ts2panda/build_win" } else { ts2abc_build_deps = [ "$ts2abc_root:ts2abc_build($buildtool_linux)" ] ts2abc_build_path = get_label_info("$ts2abc_root:ts2abc_build($buildtool_linux)", - "root_out_dir") + "/obj/ark/ts2abc/ts2panda/build" + "root_out_dir") + + "/obj/arkcompiler/ets_frontend/ts2panda/build" node_path = "${nodejs_dir}/node-v12.18.4-linux-x64/bin/" } -- Gitee