diff --git a/README.md b/README.md index 95ddf0da1970cb25f90788dbaae97d792db5f42c..b17fe52a59361fdf138c12ef49613aae768b566c 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,46 @@ #### 介绍 支持构建出ArkCompiler相关二进制以及SDK,用于ArkTS代码执行。 + + +https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-arkcompiler-guide.md + + +#install dependencies +sudo apt-get update && sudo apt-get install python ruby python3-pip git-lfs gcc-multilib g++-multilib zlib1g-dev libc++1 curl nodejs + + +#install repo by gitee +mkdir ~/bin/ +curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > ~/bin/repo +chmod a+x ~/bin/repo +export PATH=~/bin:$PATH +pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple requests + +#download source +repo init -u https://gitee.com/ark-standalone-build/manifest.git -b master +repo sync -c -j8 +repo forall -c 'git lfs pull' + +#download llvm and other needed bin utils +/prebuilts_download.sh + +#revert to enable ts2panda building +1, revert toolchain/build/core/gn/BUILD.gn +2, revert toolchain/prebuilts_download.py and prebuilts_download_config.json +3, add toolchain/third_party_jsoncpp/BUILD.gn + +#building +python ark.py x64.release + +#compile ts to abc +out/x64.release/arkcompiler/ets_frontend/es2abc helloworld.ts + +#interpreter +out/x64.release/arkcompiler/ets_runtime/ark_js_vm helloworld.abc + +#test262 +python ark.py x64.release test262 + +#ts2panda +node --expose-gc /your_code_path/out/rk3568/clang_x64/arkcompiler/ets_frontend/build/src/index.js -m --merge-abc test1/test.ts