From e8b718c0fe3e1823d7622761aefab10c5c7edc76 Mon Sep 17 00:00:00 2001 From: changjiaxing Date: Wed, 14 Sep 2022 10:59:24 +0800 Subject: [PATCH] Add ut test for merge abc issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I5QY6C?from=project-issue Signed-off-by: changjiaxing Change-Id: I53f814cc89d45202fcd1fd68812832f75075597f --- es2panda/scripts/generate_js_bytecode.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/es2panda/scripts/generate_js_bytecode.py b/es2panda/scripts/generate_js_bytecode.py index f53c7dd2ad..0371d9239b 100755 --- a/es2panda/scripts/generate_js_bytecode.py +++ b/es2panda/scripts/generate_js_bytecode.py @@ -38,6 +38,8 @@ def parse_args(): help='whether is module') parser.add_argument("--commonjs", action='store_true', help='whether is commonjs') + parser.add_argument("--merge-abc", action='store_true', + help='whether is merge abc') arguments = parser.parse_args() return arguments @@ -65,6 +67,9 @@ def gen_abc_info(input_arguments): if input_arguments.commonjs: src_index = cmd.index(input_arguments.src_js) cmd.insert(src_index, '--commonjs') + if input_arguments.merge_abc: + src_index = cmd.index(input_arguments.src_js) + cmd.insert(src_index, '--merge-abc') # insert d.ts option to cmd later run_command(cmd, path) -- Gitee