Skip to content

Commit

Permalink
llvm: sync stage2 with stage3
Browse files Browse the repository at this point in the history
  • Loading branch information
chenx97 committed Jan 5, 2024
1 parent 5385cbb commit c1666f4
Showing 1 changed file with 52 additions and 21 deletions.
73 changes: 52 additions & 21 deletions app-devel/llvm/01-runtime/defines.stage2
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,27 @@ ABSPLITDBG__ARMV6HF="${ABSPLITDBG__RETRO}"
ABSPLITDBG__ARMV7HF="${ABSPLITDBG__RETRO}"
ABSPLITDBG__I486="${ABSPLITDBG__RETRO}"
ABSPLITDBG__LOONGSON2F="${ABSPLITDBG__RETRO}"
ABSPLITDBG__M68K="${ABSPLITDBG__RETRO}"
ABSPLITDBG__POWERPC="${ABSPLITDBG__RETRO}"
ABSPLITDBG__PPC64="${ABSPLITDBG__RETRO}"

# Figure out which feature/module to enable
_LLVM_MIN_SET="clang;lld;lldb" # for AOSC OS/Retro
_LLVM_BASE_SET="${_LLVM_MIN_SET};clang-tools-extra;compiler-rt;polly" # for main-T2 arch (e.g. loongson3, riscv64 ...)
_LLVM_FULL_SET="${_LLVM_BASE_SET};mlir;bolt;pstl;flang;openmp" # for main-T1 arch (e.g. amd64, arm64 ...)
_LLVM_BASE_SET__LOONGARCH64="clang;lldb;clang-tools-extra;compiler-rt;polly"
_LLVM_MIN_SET="clang" # for Afterglow and other new ports
_LLVM_BASE_SET="${_LLVM_MIN_SET};lld;lldb;clang-tools-extra;polly" # for main-T2 arch (e.g. loongson3, riscv64 ...)
_LLVM_FULL_SET="${_LLVM_BASE_SET};mlir;bolt;flang;libclc" # for main-T1 arch (e.g. amd64, arm64 ...)
_LLVM_BASE_SET__LOONGARCH64="clang;lldb;clang-tools-extra;compiler-rt;polly;"
# FIXME: lld is broken on MIPS (as of 16.0.6), fails to link Mozilla
# applications and causes a build-time segfault when building LibreOffice.
_LLVM_BASE_SET__LOONGSON3="${_LLVM_BASE_SET/lld;}"
_LLVM_BASE_SET__MIPS64R6EL="clang;lldb;clang-tools-extra;compiler-rt;polly"
_LLVM_BASE_SET__MIPS64R6EL="clang;lldb;clang-tools-extra;compiler-rt;polly;"

_LLVM_MIN_RUNTIME_SET="libunwind" # for AOSC OS/Retro
_LLVM_BASE_RUNTIME_SET="${_LLVM_MIN_RUNTIME_SET};libcxx;libcxxabi"
_LLVM_FULL_RUNTIME_SET="${_LLVM_BASE_RUNTIME_SET};libclc"
_LLVM_MIN_RUNTIME_SET="libunwind" # for Afterglow and other new ports
_LLVM_BASE_RUNTIME_SET="${_LLVM_MIN_RUNTIME_SET};libcxx;libcxxabi;compiler-rt"
_LLVM_FULL_RUNTIME_SET="${_LLVM_BASE_RUNTIME_SET};pstl;openmp"
_LLVM_BASE_RUNTIME_SET__LOONGARCH64="libcxx;libcxxabi"
# FIXME: Runtime libraries does not build without lld.
_LLVM_BASE_RUNTIME_SET__LOONGSON3=""
_LLVM_BASE_RUNTIME_SET__MIPS64R6EL="libcxx;libcxxabi"
_LLVM_BASE_RUNTIME_SET__MIPS64R6EL=""

CMAKE_AFTER="-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_DYLIB_EXPORT_ALL=ON \
Expand All @@ -64,7 +65,7 @@ CMAKE_AFTER="-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_USE_LINKER=lld"
-DLLVM_USE_LINKER=bfd"
# Mainline
CMAKE_AFTER__BASE=" \
${CMAKE_AFTER} \
Expand All @@ -82,7 +83,12 @@ CMAKE_AFTER__LOONGARCH64=" \
-DLLVM_ENABLE_RUNTIMES=${_LLVM_BASE_RUNTIME_SET__LOONGARCH64} \
-DLLVM_USE_LINKER=bfd \
-DLLVM_PARALLEL_LINK_JOBS=2"
CMAKE_AFTER__LOONGSON3="${CMAKE_AFTER__BASE} -DLLVM_USE_LINKER=gold -DLLVM_PARALLEL_LINK_JOBS=2"
CMAKE_AFTER__LOONGSON3=" \
${CMAKE_AFTER} \
-DLLVM_ENABLE_PROJECTS=${_LLVM_BASE_SET__LOONGSON3} \
-DLLVM_ENABLE_RUNTIMES=${_LLVM_BASE_RUNTIME_SET__LOONGSON3} \
-DLLVM_PARALLEL_LINK_JOBS=2 \
-DLLVM_USE_LINKER="
CMAKE_AFTER__MIPS64R6EL=" \
${CMAKE_AFTER} \
-DLLVM_ENABLE_PROJECTS=${_LLVM_BASE_SET__MIPS64R6EL} \
Expand All @@ -100,25 +106,50 @@ CMAKE_AFTER__RETRO=" \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_BUILD_DOCS=OFF \
-DLLVM_ENABLE_PROJECTS=${_LLVM_MIN_SET} \
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
-DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_USE_LINKER=bfd \
-DLLVM_INCLUDE_TESTS=OFF"
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_USE_LINKER=bfd"
CMAKE_AFTER__ARMV4="${CMAKE_AFTER__RETRO}"
CMAKE_AFTER__ARMV6HF="${CMAKE_AFTER__RETRO}"
CMAKE_AFTER__ARMV7HF="${CMAKE_AFTER__RETRO}"
CMAKE_AFTER__I486="${CMAKE_AFTER__RETRO}"
CMAKE_AFTER__LOONGSON2F="${CMAKE_AFTER__RETRO}"
CMAKE_AFTER__M68K="${CMAKE_AFTER__RETRO}"
CMAKE_AFTER__POWERPC="${CMAKE_AFTER__RETRO}"
CMAKE_AFTER__PPC64="${CMAKE_AFTER__RETRO}"

PKGBREAK="ccls<=0.20201219-2 codelite<=15.0 cquery<=20180718-5 \
edi<=0.8.0-5 gnome-builder<=3.40.0-1 \
intel-graphics-compiler<=1.0.7423 intellij-idea<=2020.3.2-1 \
ispc<=1.15.0-1 kdevelop<=5.6.2-1 ldc<=1.24.0-1 \
liblphobos<=1.24.0-1 libobjc2<=2.1-1 llvm<=11.1.0 \
mesa<=1:21.0.2 opencl-clang<=11.0.0-1 openstf<=3.3.0 \
pocl<=1:1.6-1 pyside2<=5.15.1 qt-5<=1:5.15.1+wk5.212.0-5 \
qtcreator<=4.14.1-1 rustc<=1:1.52.1 spirv-llvm-translator<=11.0.0-1"
PKGBREAK="""
bcc<=0.27.0
bpftrace<=0.18.0
castxml<=0.6.1
ccls<=0.20220729-2
clazy<=1.11-1
codelite<=15.0
cquery<=20180718-5
edi<=0.8.0-5
dub<=1.34.0
gnome-builder<=42.1-2
intel-graphics-compiler<=1.0.7423
ispc<=1.20.0+git20230725
kdevelop<=22.08.3-1
ldc<=1.34.0
liblphobos<=1.24.0-1
libobjc2<=2.1-1
llvm<=11.1.0
mesa<=1:23.2.1-1
opencl-clang<=16.0.0
openstf<=3.3.0
openvdb<=10.0.1-2
pocl<=1:1.6-1
postgresql<=13.11-1
pyside2<=5.15.11
qt-5<=1:5.15.1+wk5.212.0-5
qtcreator<=4.14.1-1
rustc<=1:1.71.1-1
spirv-llvm-translator<=16.0.0
"""

PKGREP="llvm<=3.7.0-2"

0 comments on commit c1666f4

Please sign in to comment.