Skip to content

Commit

Permalink
Bump to r27
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Jul 27, 2024
1 parent e1b42e6 commit df3c6bc
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 103 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@main
- name: Free additional disk space
run: |
echo "Free additional disk space on host"
sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(cabal-|dotnet-|ghc-|libmono|php|aspnetcore)') \
mono-runtime-common monodoc-manual ruby
sudo apt autoremove -yq
sudo rm -rf /opt/hostedtoolcache /usr/local /usr/share/dotnet /usr/share/swift
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Build Toolchain
run: bash build.sh
- name: Waiting for debugger
Expand All @@ -45,7 +48,7 @@ jobs:
- name: Install dependicies
run: |
sudo apt update
sudo apt install -yq cmake ninja-build
sudo apt install -yq cmake ninja-build libzstd-dev
- name: Fetch archives
uses: actions/download-artifact@v2
with:
Expand Down
29 changes: 0 additions & 29 deletions D142965.patch

This file was deleted.

30 changes: 0 additions & 30 deletions additional-patch.json

This file was deleted.

8 changes: 7 additions & 1 deletion build-flang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ set -e -o pipefail -u
: ${ANDROID_NDK:=~/lib/android-ndk-r26b}
: ${FLANG_MAKE_PROCESSES:=1}

patch -p1 -d $(pwd)/out/llvm-project < flang-undef-macros.patch

ANDROID_TRIPLE="$BUILD_ARCH_OR_TYPE-linux-android"
CC_HOST_PLATFORM=$BUILD_ARCH_OR_TYPE-linux-android$DEFAULT_ANDROID_API_LEVEL
if [ $BUILD_ARCH_OR_TYPE = arm ]; then
ANDROID_TRIPLE="armv7a-linux-androideabi"
CC_HOST_PLATFORM=armv7a-linux-androideabi$DEFAULT_ANDROID_API_LEVEL
elif [ $BUILD_ARCH_OR_TYPE = host ]; then
CC_HOST_PLATFORM=x86_64-linux-gnu
Expand Down Expand Up @@ -52,7 +56,7 @@ _CONFIGURE_ARGS="\
-DCMAKE_LINKER=$(pwd)/out/stage2-install/bin/ld.lld
-DCMAKE_CXX_FLAGS=-stdlib=libc++
-DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++
-DCMAKE_INSTALL_RPATH=\\\${ORIGIN}/../lib/x86_64-unknown-linux-gnu:\\\${ORIGIN}/../lib
-DCMAKE_INSTALL_RPATH=\$ORIGIN:\$ORIGIN/../lib/x86_64-unknown-linux-gnu:\$ORIGIN/../lib
"

_BUILD_TARGET=""
Expand All @@ -66,6 +70,8 @@ if [ "$BUILD_ARCH_OR_TYPE" != "host" ]; then
_CONFIGURE_ARGS+=" -DCMAKE_SYSTEM_VERSION=$DEFAULT_ANDROID_API_LEVEL"
_CONFIGURE_ARGS+=" -DCMAKE_ANDROID_NDK=$ANDROID_NDK"
_CONFIGURE_ARGS+=" -DCMAKE_SKIP_INSTALL_RPATH=ON"
echo "" > $NDK_STANDALONE_TOOLCHAIN_DIR/sysroot/usr/include/zstd.h
echo "!<arch>" > $NDK_STANDALONE_TOOLCHAIN_DIR/sysroot/usr/lib/$ANDROID_TRIPLE/libzstd.a
_BUILD_TARGET="Fortran_main FortranRuntime FortranDecimal"
else
export LD_LIBRARY_PATH="$(pwd)/out/stage2-install/lib:${LD_LIBRARY_PATH:-}"
Expand Down
File renamed without changes.
24 changes: 12 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -e -o pipefail -u

# Fetch source
mkdir -p ~/bin
export PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Expand All @@ -11,24 +12,23 @@ git config --global user.email "you@example.com"
git config --global color.ui false
mkdir -p llvm-toolchain && cd llvm-toolchain
repo init -u https://android.googlesource.com/platform/manifest
# Modified the manifest xml, to ensure not contain darwin prebuilt
# XXX: Windows prebuilt?
sed -E 's/(^.*?(darwin).*$)/<!-- \1 -->/g' ../manifest_10552028.xml > .repo/manifests/test.xml
# Modified the manifest xml, to ensure only contain linux component
sed -E 's/(^.*?(darwin|mingw|windows).*$)/<!-- \1 -->/g' ../manifest_12027248.xml > .repo/manifests/test.xml
repo init -m test.xml
repo sync -c

# Add patch for flang
jq --argjson a "$(cat toolchain/llvm_android/patches/PATCHES.json)" \
--argjson b "$(cat ../additional-patch.json)" -n '$a + $b' \
> toolchain/llvm_android/patches/PATCHES.json
cp ../flang-undef-macros.patch toolchain/llvm_android/patches/
cp ../D142965.patch toolchain/llvm_android/patches/
# Remove duplicated repo cache
# rm -rf .repo

patch -p1 < ../Build-flang.patch
# Remove older version prebuilts
rm -rf $(find prebuilts/clang/host/linux-x86/clang* -maxdepth 0 | grep -v "clang-r522817" | grep -v "clang-stable")

# Build again
# Patch to build mlir
patch -p1 < ../build-mlir.patch

# Build
pushd toolchain/llvm_android
python build.py --no-build lldb,windows --no-musl --single-stage --skip-tests
python build.py --no-build lldb,windows --no-musl --bootstrap-use-prebuilt --skip-tests --skip-runtimes
popd

tar -cjf package-install.tar.bz2 out/install
Expand Down
48 changes: 24 additions & 24 deletions manifest_10552028.xml → manifest_12027248.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,67 @@

<remote name="aosp" fetch="https://android.googlesource.com/" review="https://android.googlesource.com/" />

<default revision="llvm-r487747" remote="aosp" sync-j="4" />
<default revision="llvm-r522817" remote="aosp" sync-j="4" />

<superproject name="platform/superproject" remote="aosp" />

<project path="bionic" name="platform/bionic" revision="d16b682f0daf74c3093bddad7e834244fa9057a9" />
<project path="bionic" name="platform/bionic" revision="de051b5d527ac72f949f3601dd2053fe11e312c1" />

<project path="toolchain/binutils" name="toolchain/binutils" revision="c19795e958ed532462948fd14b1bdfd4f6e96e03" />

<project path="toolchain/llvm-project" name="toolchain/llvm-project" revision="d9f89f4d16663d5012e5c09495f3b30ece3d2362" />
<project path="toolchain/llvm-project" name="toolchain/llvm-project" revision="d8003a456d14a3deb8054cdaa529ffbf02d9b262" />

<project path="toolchain/llvm_android" name="toolchain/llvm_android" revision="56a5097db0d7057c2d011dad8550cb3f3c7e9103" />
<project path="toolchain/llvm_android" name="toolchain/llvm_android" revision="5ab132bd1afa945695853fa093dfcc839e45f97c" />

<project path="toolchain/common" name="toolchain/common" revision="0bce8b062126242872e9f3fc66760d3f76773c49" />

<project path="external/toolchain-utils" name="platform/external/toolchain-utils" revision="584b8e46d146a2bcfeffd64448a2d8e92904168d" />
<project path="external/toolchain-utils" name="platform/external/toolchain-utils" revision="dd1ee45a84cb07337f9d5d0a6769d9b865c6e620" />

<project path="prebuilts/gcc/darwin-x86/host/headers" name="platform/prebuilts/gcc/darwin-x86/host/headers" groups="pdk,darwin" clone-depth="1" revision="4ac4f7cc41cf3c9e36fc3d6cf37fd1cfa9587a68" />

<project path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" clone-depth="1" revision="f7b0d5b0ee369864d5ac3e96ae24ec9e2b6a52da" />
<project path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" clone-depth="1" revision="5a607ae02b1bc1670ecd802d9492c29adcc13e31" />

<project path="prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8" name="platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8" clone-depth="1" revision="e5c0fcb284a3a60be094b51ede81cb66459419d9" />
<project path="prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8" name="platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8" clone-depth="1" revision="54c8410ade95e313e892745f14312f5e97c7bedc" />

<project path="prebuilts/cmake/darwin-x86" name="platform/prebuilts/cmake/darwin-x86" clone-depth="1" revision="7aea7e9880110799088cd1de509886871078306f" />

<project path="prebuilts/cmake/linux-x86" name="platform/prebuilts/cmake/linux-x86" clone-depth="1" revision="001ed46e3703c78cbc3838adfe4c14ba279f9ff7" />
<project path="prebuilts/cmake/linux-x86" name="platform/prebuilts/cmake/linux-x86" clone-depth="1" revision="b29ed51838737f0c8d0c689c50147e9bc128a31e" />

<project path="prebuilts/build-tools" name="platform/prebuilts/build-tools" clone-depth="1" revision="b6758684d4e5145532f26de432099b4f5578cb27" />
<project path="prebuilts/build-tools" name="platform/prebuilts/build-tools" clone-depth="1" revision="657142822502c93ab603027e90d99006e441058d" />

<project path="prebuilts/go/darwin-x86" name="platform/prebuilts/go/darwin-x86" groups="darwin,pdk,tradefed" clone-depth="1" revision="40fb2f6da387394d4baf64904aa28b3208dfb46e" />
<project path="prebuilts/go/darwin-x86" name="platform/prebuilts/go/darwin-x86" groups="darwin,pdk,tradefed" clone-depth="1" revision="41f6d6bc9055f7e821b114233579e8456130eef8" />

<project path="prebuilts/go/linux-x86" name="platform/prebuilts/go/linux-x86" groups="linux,pdk,tradefed" clone-depth="1" revision="b8ef64ad4fdb1e85846486945f95766b6884e2dd" />
<project path="prebuilts/go/linux-x86" name="platform/prebuilts/go/linux-x86" groups="linux,pdk,tradefed" clone-depth="1" revision="756ef2ad9a122c4b3cf359f80f92b3df6fc7bd4b" />

<project path="external/zstd" name="platform/external/zstd" revision="bf3299504385d87745beae24e7cfab1819ba2f3d" />
<project path="external/zstd" name="platform/external/zstd" revision="38ed4f43b1c8a40559aebded780baa563dd10747" />

<project path="external/libedit" name="platform/external/libedit" revision="892b8b381ae82ac3184900d989a516854d8b1197" />

<project path="external/swig" name="platform/external/swig" revision="6ffc1dbf29ba98c4d8aa71ebc9b484e973fe1030" />
<project path="external/swig" name="platform/external/swig" revision="d0f0f90be16c2ac553b5fa08512045273135147a" />

<project path="toolchain/xz" name="toolchain/xz" revision="47426872d1366c32538a8e9c8f559b03cb45b648" />

<project path="external/libxml2" name="platform/external/libxml2" revision="dd0c2770849096989272d123ada518adc9a2624e" />
<project path="external/libxml2" name="platform/external/libxml2" revision="393a172b4d91f3677beb3d98568a94b08f014fcf" />

<project path="external/libncurses" name="platform/external/ncurses" revision="34cc24447dc9e5700110580c784d9606f6cff5f0" />

<project path="prebuilts/python/linux-x86" name="platform/prebuilts/python/linux-x86" clone-depth="1" revision="3665e3a3bd0cd0d93f6247eb596938cea48268be" />
<project path="prebuilts/python/linux-x86" name="platform/prebuilts/python/linux-x86" clone-depth="1" revision="fce2346610379fdcce9dc7423c0e9a04e1a43cbf" />

<project path="prebuilts/python/darwin-x86" name="platform/prebuilts/python/darwin-x86" clone-depth="1" revision="8a7b323c92153acc4390bf71392dec2dbb10f4f5" />
<project path="prebuilts/python/darwin-x86" name="platform/prebuilts/python/darwin-x86" clone-depth="1" revision="3400487f6a77cc05ee5d4799575372713ce63232" />

<project path="prebuilts/python/windows-x86" name="platform/prebuilts/python/windows-x86" clone-depth="1" revision="7119932cd3cea23f16db62e683b69c23e415ff09" />
<project path="prebuilts/python/windows-x86" name="platform/prebuilts/python/windows-x86" clone-depth="1" revision="6cf03be338b41e403770c097746e777c5c9ed9cb" />

<project path="prebuilts/clang/host/darwin-x86" name="platform/prebuilts/clang/host/darwin-x86" clone-depth="1" revision="65050165df5c9023dd899c9391521ca71613a866" />
<project path="prebuilts/clang/host/darwin-x86" name="platform/prebuilts/clang/host/darwin-x86" clone-depth="1" revision="b90de4eaf41af167619f40069e877372b1e32778" />

<project path="prebuilts/clang/host/darwin-universal" name="platform/prebuilts/clang/host/darwin-universal" clone-depth="1" revision="592f071af1df99cb463ff5b670cd383efd49a6e1" />
<project path="prebuilts/clang/host/linux-x86" name="platform/prebuilts/clang/host/linux-x86" clone-depth="1" revision="b6cafaac9b3c09f6cd81634f1cdd44606ae66d28" />

<project path="prebuilts/clang/host/linux-x86" name="platform/prebuilts/clang/host/linux-x86" clone-depth="1" revision="eed2fff8b93ce059eea7ccd8fc5eee37f8adb432" />
<project path="prebuilts/clang/host/windows-x86" name="platform/prebuilts/clang/host/windows-x86" clone-depth="1" revision="37c7bd8f14cfdff5e653c78ed03ca329ce730cec" />

<project path="prebuilts/clang/host/windows-x86" name="platform/prebuilts/clang/host/windows-x86" clone-depth="1" revision="e5b9f24d6d36055aad926dd33b7a361787c54f0b" />
<project path="toolchain/prebuilts/ndk/releases" name="toolchain/prebuilts/ndk/releases" clone-depth="1" revision="e98ef7e0275b506b8843f2d0d52f3256e46df4b5" />

<project path="toolchain/prebuilts/ndk/r25" name="toolchain/prebuilts/ndk/r25" revision="1622e087e1b881a0c7c744091d314662d12f0997" />

<project path="toolchain/prebuilts/ndk/r26" name="toolchain/prebuilts/ndk/r26" revision="64f28f5f676816746d8d37c6d057b1065952160a" />
<project path="tools/repohooks" name="platform/tools/repohooks" revision="eee438b68bc9c55036016d681269ee8c261c94ff" />

<project path="toolchain/prebuilts/sysroot/platform/riscv64-linux-android" name="toolchain/prebuilts/sysroot/platform/riscv64-linux-android" revision="d19c6ae1817af6846099905de2a422eae1de5d11" />

<repo-hooks in-project="platform/tools/repohooks" enabled-list="pre-upload" />
</manifest>

0 comments on commit df3c6bc

Please sign in to comment.