build: compile with Proton Clang.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
This commit is contained in:
parent
e72c9fc255
commit
fc87a3047e
1 changed files with 10 additions and 7 deletions
17
build.sh
17
build.sh
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
TC_DIR="$HOME"
|
|
||||||
echo "Cloning dependencies"
|
echo "Cloning dependencies"
|
||||||
git clone --depth=1 https://github.com/mvaisakh/gcc-arm64 -b gcc-new $TC_DIR/arm64
|
git clone --depth=1 https://github.com/kdrag0n/proton-clang clang
|
||||||
git clone --depth=1 https://github.com/mvaisakh/gcc-arm -b gcc-new $TC_DIR/arm
|
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9 gcc
|
||||||
|
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.9 gcc32
|
||||||
git clone https://github.com/sm6115-dev/AnyKernel3.git --depth=1 AnyKernel
|
git clone https://github.com/sm6115-dev/AnyKernel3.git --depth=1 AnyKernel
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
@ -10,6 +10,7 @@ KERNEL_DIR=$(pwd)
|
||||||
IMAGE="${KERNEL_DIR}/out/arch/arm64/boot/Image"
|
IMAGE="${KERNEL_DIR}/out/arch/arm64/boot/Image"
|
||||||
TANGGAL=$(date +"%Y%m%d-%H")
|
TANGGAL=$(date +"%Y%m%d-%H")
|
||||||
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
PATH="${KERNEL_DIR}/clang/bin:${KERNEL_DIR}/gcc/bin:${KERNEL_DIR}/gcc32/bin:${PATH}"
|
||||||
export ARCH=arm64
|
export ARCH=arm64
|
||||||
export KBUILD_BUILD_USER=gagan
|
export KBUILD_BUILD_USER=gagan
|
||||||
export KBUILD_BUILD_HOST=malvi
|
export KBUILD_BUILD_HOST=malvi
|
||||||
|
@ -18,10 +19,12 @@ make O=out ARCH=arm64 vendor/bengal-perf_defconfig
|
||||||
|
|
||||||
# Compile plox
|
# Compile plox
|
||||||
compile() {
|
compile() {
|
||||||
make -j$(nproc --all) O=out \
|
make -j$(nproc) O=out \
|
||||||
PATH="$TC_DIR/arm64/bin:$TC_DIR/arm/bin:$PATH" \
|
ARCH=arm64 \
|
||||||
CROSS_COMPILE=$TC_DIR/arm64/bin/aarch64-elf- \
|
CC=clang \
|
||||||
CROSS_COMPILE_ARM32=$TC_DIR/arm/bin/arm-eabi- -Wno-format Image dtb.img dtbo.img |& tee $LOG
|
CLANG_TRIPLE=aarch64-linux-gnu- \
|
||||||
|
CROSS_COMPILE=aarch64-linux-android- \
|
||||||
|
CROSS_COMPILE_ARM32=arm-linux-androideabi- $1 $2 $3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue