diff --git a/build-from-public-repos.sh b/build-from-public-repos.sh index 6257d28a..a101a246 100755 --- a/build-from-public-repos.sh +++ b/build-from-public-repos.sh @@ -1,14 +1,27 @@ #!/bin/bash -git config --global user.email "pawel@32bitmicro.com" -git config --global user.name "Pawel Wodnicki" - -mkdir repos -git -C repos clone https://github.com/32bitmicro/llvm-project.git -git -C repos/llvm-project am -k "$PWD"/patches/llvm-project/*.patch -git -C repos clone https://github.com/32bitmicro/picolibc.git -git -C repos/picolibc apply "$PWD"/patches/picolibc.patch -mkdir build-from-repos -cd build-from-repos -cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc -ninja llvm-toolchain \ No newline at end of file +RELEASE=18.x +SUFFIX=rc1 +PICOLIBC=1.8.6 +REPOS=repos-$RELEASE-$SUFFIX +BUILD=build-$RELEASE-$SUFFIX + +git config --global user.email $EMAIL +git config --global user.name $NAME + +PATHPREFIX="${PREFIX:-/tmp}" +cd $PATHPREFIX +git clone https://github.com/32bitmicro/LLVM-Embedded-Toolchain.git + +mkdir $REPOS +git -C $REPOS clone -b release/$RELEASE git@github.com:32bitmicro/llvm-project.git +#git -C $REPOS/llvm-project am -k "$PWD"/patches/llvm-project/*.patch +git -C $REPOS clone git@github.com:32bitmicro/picolibc.git +git -C $REPOS/picolibc checkout $PICOLIBC -b $PICOLIBC +git -C $REPOS/picolibc apply "$PWD"/patches/picolibc.patch + +mkdir $BUILD +cd $BUILD +cmake $PATHPREFIX/LLVM-Embedded-Toolchain -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=$PATHPREFIX/$REPOS/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=$PATHPREFIX/$REPOS/picolibc -DETOOL_VERSION_SUFFIX=$SUFFIX +ninja llvm-toolchain +ninja package-llvm-toolchain