From b38acda69c78230d9919e6f5b554e05e47af7d27 Mon Sep 17 00:00:00 2001 From: songhao Date: Sun, 24 Apr 2022 15:27:50 +0800 Subject: [PATCH 1/4] 111 Signed-off-by: songhao --- ts2panda/ts2abc/BUILD.gn | 8 ++++---- ts2panda/ts2abc_config.gni | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 08bb3083bb..0e4dd73f58 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -if (!defined(ark_flag)) { +if (!defined(ark_independent_build)) { import("//ark/runtime_core/ark_config.gni") - import("//build/ohos.gni") + import("$build_root/ohos.gni") } else { - import("//build/ark.gni") + import("$build_root/ark.gni") import("//runtime_core/ark_config.gni") } @@ -123,7 +123,7 @@ source_set("jsoncpp_set_static") { ] } -if (!defined(ark_flag)) { +if (!defined(ark_independent_build)) { ohos_static_library("jsoncpp_static") { deps = [ ":jsoncpp_set_static" ] use_exceptions = true diff --git a/ts2panda/ts2abc_config.gni b/ts2panda/ts2abc_config.gni index 3bf3a00fd4..6541f03395 100755 --- a/ts2panda/ts2abc_config.gni +++ b/ts2panda/ts2abc_config.gni @@ -11,19 +11,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -if (!defined(ark_flag)) { - import("//build/ohos.gni") - import("//build/test.gni") +if (!defined(ark_independent_build)) { + import("$build_root/ohos.gni") + import("$build_root/test.gni") ts2abc_root = "//ark/ts2abc/ts2panda" } else { - import("//build/ark.gni") + import("$build_root/ark.gni") ts2abc_root = "//ts2abc/ts2panda" } declare_args() { - buildtool_linux = "//build/toolchain/linux:clang_x64" - buildtool_mac = "//build/toolchain/mac:clang_x64" - buildtool_win = "//build/toolchain/mingw:mingw_x86_64" + buildtool_linux = "$build_root/toolchain/linux:clang_x64" + buildtool_mac = "$build_root/toolchain/mac:clang_x64" + buildtool_win = "$build_root/toolchain/mingw:mingw_x86_64" nodejs_dir = "" node_path = "" -- Gitee From d428b7326655168868c882bad22eba8de91dad2f Mon Sep 17 00:00:00 2001 From: songhao Date: Sun, 24 Apr 2022 16:38:17 +0800 Subject: [PATCH 2/4] add build Signed-off-by: songhao --- test262/run_sunspider.py | 7 +++---- ts2panda/ts2abc_config.gni | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/test262/run_sunspider.py b/test262/run_sunspider.py index 1e8c42ad24..e1562ac1a7 100755 --- a/test262/run_sunspider.py +++ b/test262/run_sunspider.py @@ -66,7 +66,6 @@ def parse_args(): return arguments -ARK_ARGS = "--gc-type=epsilon" ICU_PATH = f"--icu-data-path={CODE_ROOT}/third_party/icu/ohos_icu4j/data" ARK_TOOL = DEFAULT_ARK_TOOL ARK_FRONTEND_TOOL = DEFAULT_ARK_FRONTEND_TOOL @@ -197,17 +196,17 @@ class ArkProgram(): qemu_arg1 = "-L" qemu_arg2 = self.arch_root cmd_args = [qemu_tool, qemu_arg1, qemu_arg2, self.ark_tool, - ARK_ARGS, ICU_PATH, + ICU_PATH, f'{file_name_pre}.abc'] elif self.arch == ARK_ARCH_LIST[2]: qemu_tool = "qemu-arm" qemu_arg1 = "-L" qemu_arg2 = self.arch_root cmd_args = [qemu_tool, qemu_arg1, qemu_arg2, self.ark_tool, - ARK_ARGS, ICU_PATH, + ICU_PATH, f'{file_name_pre}.abc'] elif self.arch == ARK_ARCH_LIST[0]: - cmd_args = [self.ark_tool, ARK_ARGS, ICU_PATH, + cmd_args = [self.ark_tool, ICU_PATH, f'{file_name_pre}.abc'] retcode = exec_command(cmd_args) diff --git a/ts2panda/ts2abc_config.gni b/ts2panda/ts2abc_config.gni index 6541f03395..fa90198fdc 100755 --- a/ts2panda/ts2abc_config.gni +++ b/ts2panda/ts2abc_config.gni @@ -33,12 +33,11 @@ declare_args() { ts2abc_build_path = "" } +node_modules = "//prebuilts/build-tools/common/ts2abc/node_modules" if (build_public_version) { nodejs_dir = "//prebuilts/build-tools/common/nodejs" - node_modules = "//prebuilts/build-tools/common/ts2abc/node_modules" } else { nodejs_dir = "//prebuilts/ace-toolkit/nodejs" - node_modules = "//prebuilts/ace-toolkit/ace-loader/panda/node_modules" } if (host_toolchain == buildtool_mac) { -- Gitee From ac6d734040adc48137ce88c7eb89d42baffc77c0 Mon Sep 17 00:00:00 2001 From: songhao Date: Sun, 24 Apr 2022 17:29:24 +0800 Subject: [PATCH 3/4] format Signed-off-by: songhao --- ts2panda/ts2abc/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 0e4dd73f58..05b73f19fa 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -15,8 +15,8 @@ if (!defined(ark_independent_build)) { import("//ark/runtime_core/ark_config.gni") import("$build_root/ohos.gni") } else { - import("$build_root/ark.gni") import("//runtime_core/ark_config.gni") + import("$build_root/ark.gni") } jsoncpp_root = "$ark_third_party_root/jsoncpp" -- Gitee From 1e24f7ffbdd4e3665227cc0e635944d8ee4d5a60 Mon Sep 17 00:00:00 2001 From: songhao Date: Sun, 24 Apr 2022 18:57:05 +0800 Subject: [PATCH 4/4] 4.24 Signed-off-by: songhao --- ts2panda/ts2abc/BUILD.gn | 2 +- ts2panda/ts2abc_config.gni | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ts2panda/ts2abc/BUILD.gn b/ts2panda/ts2abc/BUILD.gn index 05b73f19fa..04c5c2a5e2 100755 --- a/ts2panda/ts2abc/BUILD.gn +++ b/ts2panda/ts2abc/BUILD.gn @@ -13,7 +13,7 @@ if (!defined(ark_independent_build)) { import("//ark/runtime_core/ark_config.gni") - import("$build_root/ohos.gni") + import("//build/ohos.gni") } else { import("//runtime_core/ark_config.gni") import("$build_root/ark.gni") diff --git a/ts2panda/ts2abc_config.gni b/ts2panda/ts2abc_config.gni index fa90198fdc..496060cae9 100755 --- a/ts2panda/ts2abc_config.gni +++ b/ts2panda/ts2abc_config.gni @@ -12,8 +12,9 @@ # limitations under the License. if (!defined(ark_independent_build)) { - import("$build_root/ohos.gni") - import("$build_root/test.gni") + import("//build/ohos.gni") + import("//build/test.gni") + build_root = "//build" ts2abc_root = "//ark/ts2abc/ts2panda" } else { import("$build_root/ark.gni") -- Gitee