Skip to content

Commit

Permalink
toolchains: add proton clang
Browse files Browse the repository at this point in the history
  • Loading branch information
fukiame committed Oct 11, 2023
1 parent dde2ef0 commit 6764521
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions toolchains/Proton-Clang.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

maindir="$(pwd)"
outside="${maindir}/.."

dir="${outside}/proton-clang-master"

case $1 in
"setup" )
# Clone compiler
if [[ ! -d "${dir}" ]]; then
curl -Lo a.tar.gz "https://github.com/kdrag0n/proton-clang/archive/master.tar.gz"
tar -zxf a.tar.gz
fi
;;

"build" )
export PATH="${dir}/bin:/usr/bin:${PATH}"
make -j$(nproc --all) O=out ARCH=arm64 SUBARCH=arm64 $2
make -j$(nproc --all) O=out \
CROSS_COMPILE="aarch64-linux-gnu-" \
CROSS_COMPILE_ARM32="arm-linux-gnueabi-" \
CROSS_COMPILE_COMPAT="arm-linux-gnueabi-" \
CC=clang \
LD=ld.lld \
NM=llvm-nm \
AR=llvm-ar \
STRIP=llvm-strip \
OBJCOPY=llvm-objcopy \
OBJDUMP=llvm-objdump \
READELF=llvm-readelf \
LLVM_IAS=1 \
HOSTCC=clang \
HOSTCXX=clang++ \
HOSTLD=ld.lld \
HOSTAR=llvm-ar \
2>&1 | tee ${CUR_TOOLCHAIN}.log
;;
esac

0 comments on commit 6764521

Please sign in to comment.