Watch 1.1K Star 5.7K Fork 933

GVPHarmonyOS / OpenArkCompilerC++MulanPSL-1.0

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
方舟编译器开源代码官方主仓库 spread retract

Clone or download 2.16 KB
Copy Edit Raw Blame History
EugeneChen authored 2019-10-31 16:39 . upload en doc,code refactor

Developer Guide

By referring to this document, you can download the OpenArkCompiler source code to compile it.


Prepare development environment by referring to Environment Configuration.

Downloading Source Code

Download address: You can download the OpenArkCompiler source code in Clone or Download mode.

Note: The download directory of the source code is openarkcompiler by default.

Compiling Source Code

Run the following command in the openarkcompiler directory to compile OpenArkCompiler. The output path is openarkcompiler/out/bin by default.

source build/

Command description:

  • source build/ 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.

Compiling Sample

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:

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/;
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/; make; cd samples/helloworld/; make

Comment ( 0 )

Sign in for post a comment


Help Search