Gentoo Archives: gentoo-soc

From: Gunwant Jain <therealgunwant@×××××.com>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Weekly Report: Portage Powered Android
Date: Sat, 25 Jul 2020 08:21:18
Message-Id: 20200725082112.b3s4yoz5hxkff676@tardis.localdomain
In Reply to: Re: [gentoo-soc] Weekly Report: Portage Powered Android by Gunwant Jain
1 I am sorry to add on like this, but if it was not mentioned, I am not
2 using any prebuilt repository AOSP bundled with llvm_android. This is
3 the reason why I spent the time emerging Clang on my phone; for using it
4 to build stage1.
5 Although if advised otherwise, I could potentially break the AOSP
6 development cycle for our use and start the same cycle but with prebuilt
7 LLVM toolchain for AArch64 host instead of X86. I could expand on how to
8 do this, if you would like.
9
10 On 20/07/25 01:33PM, Gunwant Jain wrote:
11 > On 20/07/25 11:00AM, Benda Xu wrote:
12 > > Gunwant Jain <therealgunwant@×××××.com> writes:
13 > >
14 > > > Yes it did.
15 > > > I can also report that llvm_android's stage1 clang is compiled for
16 > > > aarch64, I am on the stage2 step currently.
17 > >
18 > > Good. Could you please remind me of the meanings of llvm stage1 and
19 > > stage2?
20 >
21 > Sure. AOSP provides its own distribution of LLVM. So most of what stage1
22 > and stage2 I will be describing could be taken from [1].
23 > Basically, we build LLVM stage1 using our own host toolchain. Then we
24 > use the newly built stage1 compiler to build stage2, the ready to use
25 > toolchain.
26 >
27 > Coming to how this goes in our use-case, if we were to build the LLVM
28 > toolchain using llvm_android (basically just build scripts), we will use
29 > a prebuilt Clang toolchain, bundled with llvm_android to build stage1.
30 > Also AOSP targets only X86 architechture in stage1.
31 > After stage1 is built, the build script proceeds to start building
32 > stage2. This is where we use the newly built stage1 compilers to build
33 > stage2 compilers. AOSP targets AArch64, ARM, X86 and BPF when building
34 > stage2. Then the build script packages stage2 install and dumps the tar
35 > for our use.
36 >
37 > In the cycle of AOSP development, this newly packaged stage2 will be
38 > provided as the prebuilt LLVM toolchain in [2]. This repository is used:
39 > - In the AOSP tree, when someone builds a new custom ROM.
40 > - In llvm_android as the prebuilt toolchain used to build a version
41 > bumped stage1.
42 >
43 > For us, we will have to target AArch64 in building both stage1 and
44 > stage2.
45 >
46 >
47 > Regards,
48 > Gunwant
49 >
50 > [1] https://llvm.org/docs/BuildingADistribution.html
51 > [2] https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/

Attachments

File name MIME type
signature.asc application/pgp-signature