Skip to content

Commit fc87a30

Browse files
committed
build: compile with Proton Clang.
Signed-off-by: Gagan Malvi <[email protected]>
1 parent e72c9fc commit fc87a30

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

build.sh

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/bash
2-
TC_DIR="$HOME"
32
echo "Cloning dependencies"
4-
git clone --depth=1 https://github.com/mvaisakh/gcc-arm64 -b gcc-new $TC_DIR/arm64
5-
git clone --depth=1 https://github.com/mvaisakh/gcc-arm -b gcc-new $TC_DIR/arm
3+
git clone --depth=1 https://github.com/kdrag0n/proton-clang clang
4+
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9 gcc
5+
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.9 gcc32
66
git clone https://github.com/sm6115-dev/AnyKernel3.git --depth=1 AnyKernel
77

88
echo "Done"
99
KERNEL_DIR=$(pwd)
1010
IMAGE="${KERNEL_DIR}/out/arch/arm64/boot/Image"
1111
TANGGAL=$(date +"%Y%m%d-%H")
1212
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
13+
PATH="${KERNEL_DIR}/clang/bin:${KERNEL_DIR}/gcc/bin:${KERNEL_DIR}/gcc32/bin:${PATH}"
1314
export ARCH=arm64
1415
export KBUILD_BUILD_USER=gagan
1516
export KBUILD_BUILD_HOST=malvi
@@ -18,10 +19,12 @@ make O=out ARCH=arm64 vendor/bengal-perf_defconfig
1819

1920
# Compile plox
2021
compile() {
21-
make -j$(nproc --all) O=out \
22-
PATH="$TC_DIR/arm64/bin:$TC_DIR/arm/bin:$PATH" \
23-
CROSS_COMPILE=$TC_DIR/arm64/bin/aarch64-elf- \
24-
CROSS_COMPILE_ARM32=$TC_DIR/arm/bin/arm-eabi- -Wno-format Image dtb.img dtbo.img |& tee $LOG
22+
make -j$(nproc) O=out \
23+
ARCH=arm64 \
24+
CC=clang \
25+
CLANG_TRIPLE=aarch64-linux-gnu- \
26+
CROSS_COMPILE=aarch64-linux-android- \
27+
CROSS_COMPILE_ARM32=arm-linux-androideabi- $1 $2 $3
2528
}
2629

2730

0 commit comments

Comments
 (0)