mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Toolchain: Always remove the previous artifacts when building
This commit is contained in:
parent
7b156a7add
commit
bd318dcdcd
Notes:
sideshowbarker
2024-07-18 22:01:11 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/bd318dcdcd3 Pull-request: https://github.com/SerenityOS/serenity/pull/5460
1 changed files with 35 additions and 32 deletions
|
@ -140,47 +140,50 @@ pushd "$DIR/Tarballs"
|
|||
echo "Skipped downloading gcc"
|
||||
fi
|
||||
|
||||
if [ ! -d ${BINUTILS_NAME} ]; then
|
||||
echo "Extracting binutils..."
|
||||
tar -xzf ${BINUTILS_PKG}
|
||||
|
||||
pushd ${BINUTILS_NAME}
|
||||
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"
|
||||
if [ -d ${BINUTILS_NAME} ]; then
|
||||
rm -rf "${BINUTILS_NAME}"
|
||||
rm -rf "$DIR/Build/$ARCH/$BINUTILS_NAME"
|
||||
fi
|
||||
echo "Extracting binutils..."
|
||||
tar -xzf ${BINUTILS_PKG}
|
||||
|
||||
if [ ! -d $GCC_NAME ]; then
|
||||
echo "Extracting gcc..."
|
||||
tar -xzf $GCC_PKG
|
||||
pushd $GCC_NAME
|
||||
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"
|
||||
pushd ${BINUTILS_NAME}
|
||||
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
|
||||
$MD5SUM "$DIR"/Patches/binutils.patch > .patch.applied
|
||||
popd
|
||||
|
||||
if [ -d ${GCC_NAME} ]; then
|
||||
# Drop the previously patched extracted dir
|
||||
rm -rf "${GCC_NAME}"
|
||||
# Also drop the build dir
|
||||
rm -rf "$DIR/Build/$ARCH/$GCC_NAME"
|
||||
fi
|
||||
echo "Extracting gcc..."
|
||||
tar -xzf $GCC_PKG
|
||||
pushd $GCC_NAME
|
||||
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
|
||||
$MD5SUM "$DIR/Patches/gcc.patch" > .patch.applied
|
||||
popd
|
||||
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
pushd "gcc-${GCC_VERSION}"
|
||||
./contrib/download_prerequisites
|
||||
popd
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue