From 76ed93ac00059b99cf80b356268e66266ecad38d Mon Sep 17 00:00:00 2001 From: Chen Wang Date: Wed, 19 Jan 2022 16:51:35 +0800 Subject: [PATCH] added how to build clang for aosp Signed-off-by: Chen Wang --- docs/howto-setup-build-env.md | 14 +++++++++++++- docs/zh/howto-setup-build-env.md | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/howto-setup-build-env.md b/docs/howto-setup-build-env.md index 25cd59f..2240c2e 100644 --- a/docs/howto-setup-build-env.md +++ b/docs/howto-setup-build-env.md @@ -7,6 +7,7 @@ - [3. Install repo](#3-install-repo) - [4. Download source code](#4-download-source-code) - [5. Build](#5-build) +- [6. Build Clang](#6-build-clang) @@ -80,9 +81,20 @@ $ repo sync -j8 Note: Because it is still in the development process, full compilation of `m` is not currently supported. +Following is just sample on how to build without ninja. + ``` $ cd /home/u/aosp $ source ./build/envsetup.sh $ lunch aosp_riscv64-eng -$ m --skip-ninja --skip-soong-tests +$ m --skip-ninja +``` + +# 6. Build Clang + +``` +$ mkdir llvm-toolchain && cd llvm-toolchain +$ repo init -u git@github.com:aosp-riscv/platform_manifest.git -b riscv64-llvm-master +$ repo sync -c +$ python toolchain/llvm_android/build.py ``` diff --git a/docs/zh/howto-setup-build-env.md b/docs/zh/howto-setup-build-env.md index a39a03f..063accf 100644 --- a/docs/zh/howto-setup-build-env.md +++ b/docs/zh/howto-setup-build-env.md @@ -9,6 +9,7 @@ - [3. 安装 repo](#3-安装-repo) - [4. 下载源码](#4-下载源码) - [5. 编译](#5-编译) +- [6. 构建 Clang](#6-构建-clang) @@ -85,9 +86,20 @@ $ repo sync -j8 注意:因为还在开发过程中,当前还不支持完整的编译 `m`。 +下面是一个例子,编译 aosp 但不运行最终的 ninja 构建。 + ``` $ cd /home/u/aosp $ source ./build/envsetup.sh $ lunch aosp_riscv64-eng -$ m --skip-ninja --skip-soong-tests +$ m --skip-ninja +``` + +# 6. 构建 Clang + ``` +$ mkdir llvm-toolchain && cd llvm-toolchain +$ repo init -u git@github.com:aosp-riscv/platform_manifest.git -b riscv64-llvm-master +$ repo sync -c +$ python toolchain/llvm_android/build.py +``` \ No newline at end of file -- Gitee