mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Toolchain: Don't create repository for patches if not necessary
The toolchain builds just fine without the git repository (tested on windows and linux). We can skip setting up the repo and apply the patches directly when we aren't working on the toolchain itself. A flag `--dev` has been added for cases when git repo is needed. Without the flag, regular patch is applied. This significantly improves build times for first time builds.
This commit is contained in:
parent
80fecc615a
commit
c4d05049c4
Notes:
sideshowbarker
2024-07-19 07:14:57 +09:00
Author: https://github.com/devsh0 🔰 Commit: https://github.com/SerenityOS/serenity/commit/c4d05049c47 Pull-request: https://github.com/SerenityOS/serenity/pull/1982 Reviewed-by: https://github.com/awesomekling
1 changed files with 25 additions and 8 deletions
|
@ -32,6 +32,15 @@ elif [ "$(uname -s)" = "FreeBSD" ]; then
|
|||
NPROC="sysctl -n hw.ncpu"
|
||||
fi
|
||||
|
||||
git_patch=
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
--dev ) git_patch=1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
echo PREFIX is "$PREFIX"
|
||||
echo SYSROOT is "$SYSROOT"
|
||||
|
||||
|
@ -111,10 +120,14 @@ pushd "$DIR/Tarballs"
|
|||
tar -xzf ${BINUTILS_PKG}
|
||||
|
||||
pushd ${BINUTILS_NAME}
|
||||
git init >/dev/null
|
||||
git add . >/dev/null
|
||||
git commit -am "BASE" >/dev/null
|
||||
git apply "$DIR"/Patches/binutils.patch >/dev/null
|
||||
if [ "$git_patch" = "1" ]; then
|
||||
git init > /dev/null
|
||||
git add . > /dev/null
|
||||
git commit -am "BASE" > /dev/null
|
||||
git apply "$DIR"/Patches/binutils.patch > /dev/null
|
||||
else
|
||||
patch -p1 < "$DIR"/Patches/binutils.patch > /dev/null
|
||||
fi
|
||||
popd
|
||||
else
|
||||
echo "Skipped extracting binutils"
|
||||
|
@ -125,10 +138,14 @@ pushd "$DIR/Tarballs"
|
|||
tar -xzf $GCC_PKG
|
||||
|
||||
pushd $GCC_NAME
|
||||
git init >/dev/null
|
||||
git add . >/dev/null
|
||||
git commit -am "BASE" >/dev/null
|
||||
git apply "$DIR"/Patches/gcc.patch >/dev/null
|
||||
if [ "$git_patch" = "1" ]; then
|
||||
git init > /dev/null
|
||||
git add . > /dev/null
|
||||
git commit -am "BASE" > /dev/null
|
||||
git apply "$DIR"/Patches/gcc.patch > /dev/null
|
||||
else
|
||||
patch -p1 < "$DIR"/Patches/gcc.patch > /dev/null
|
||||
fi
|
||||
popd
|
||||
else
|
||||
echo "Skipped extracting gcc"
|
||||
|
|
Loading…
Reference in a new issue