同步操作将从 方舟编译器/OpenArkCompiler 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
By referring to this document, you can download the OpenArkCompiler source code to compile it.
Prepare development environment by referring to Environment Configuration.
Download address: https://code.opensource.huaweicloud.com/HarmonyOS/OpenArkCompiler/home
You can download the OpenArkCompiler source code in Clone
or Download
mode.
Note: The download directory of the source code is openarkcompiler by default.
Run the following command in the openarkcompiler directory to compile OpenArkCompiler. The output path is openarkcompiler/out/bin by default.
source build/envsetup.sh
make
Command description:
source build/envsetup.sh
: Initialize the environment and add the toolchain path openarkcompiler/out/bin of OpenArkCompiler to environment variables.make
: Compile the release version of OpenArkCompiler.make BUILD_TYPE=DEBUG
: Compile the debug version of OpenArkCompiler.The Java basic library is required for OpenArkCompiler to compile a sample. The following uses the Java basic library provided by the Android OS to describe the sample compilation process.
Preparing basic library
Download the Android code and compile it locally to obtain the libcore JAR package. The Android 9.0.0_r45 version is recommended.
Gitee also provides the compiled libcore JAR file. Download address: https://gitee.com/mirrors/java-core/
Generating the libjava-core.mplt file
Before compilation, create the libjava-core directory in the openarkcompiler directory, copy the java-core.jar file to the libjava-core directory, and run the following commands in the openarkcompiler directory:
source build/envsetup.sh;
make;
cd libjava-core;
jbc2mpl -injar java-core.jar -out libjava-core;
After the execution is complete, the libjava-core.mplt file is generated in the directory.
Compiling sample code
The sample code is in the openarkcompiler/samples directory.
Take the samples/helloworld/ code as an example. Run the following command in the openarkcompiler/ directory:
source build/envsetup.sh; make; cd samples/helloworld/; make
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。