mirror of
https://github.com/openharmony/ark_js_runtime.git
synced 2026-08-27 20:40:01 -04:00
04d1f010bc
Signed-off-by: DaiH <daihuina1@huawei.com> https://gitee.com/openharmony/ark_js_runtime/issues/I53710?from=project-issue Documentation Modifications About Compilation 1. Update compilation order 2. "hi3516dv300" -> "rk3568" Change-Id: I3a9f5bc91cda12546ac3cf6cefafb969f5510bdb
15 KiB
15 KiB
工具链使用
方舟前端工具采用命令行交互方式,支持将JS代码转换为方舟字节码,使其能够在方舟运行时上运行。支持Windows/Linux/Mac平台。
JS字节码编译工具概述
使用前端工具将JS文件转换为方舟字节码文件。方舟前端工具在linux平台上可通过全量编译或指定编译前端工具链获取。
构建编译:
$ ./build.sh --product-name rk3568 --build-target ark_ts2abc_build
安装node和npm后, 使用前端工具:
$ cd out/rk3568/clang_x64/ark/ark/build
$ npm install
$ node --expose-gc src/index.js [选项] file.js
反汇编器工具概述
工具名称为ark_disasm,用于将二进制格式的方舟字节码文件转换为文本格式的方舟字节码文件。
编译生成反汇编工具:
./build.sh --product-name rk3568 --build-target ark_host_linux_tools_packages
命令行格式:
ark_disasm [选项] 输入文件 输出文件
输入文件:二进制格式的方舟字节码
输出文件:文本格式的方舟字节码