# ark-standalone-build **Repository Path**: jhe21/ark-standalone-build ## Basic Information - **Project Name**: ark-standalone-build - **Description**: ArkCompier编译仓库管理 - **Primary Language**: XML - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 56 - **Created**: 2023-08-05 - **Last Updated**: 2024-02-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ArkCompiler编译仓库管理 #### 介绍 支持构建出ArkCompiler相关二进制以及SDK,用于ArkTS代码执行。 # Forked by Jhe21 ## official instructions 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/jhe21/ark-standalone-build.git -b master - repo sync -c -j8 - repo forall -c 'git lfs pull' ## download llvm and other needed bin utils, try npm install manually using local high version npm if meets npm error under the folder ts2pand/ - /prebuilts_download.sh ## revert to enable ts2panda building, currently not neccesary if use jhe21's forked toolchain 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 ## aot compiler /your_code_path/out/rk3568/clang_x64/arkcompiler/ets_runtime/ark_aot_compiler --aot-file=./hello-world hello-world.abc ## execute aot /your_code_path/out/rk3568/clang_x64/arkcompiler/ets_runtime/ark_js_vm --aot-file=./hello-world --entry-point=hello-world hello-world.abc