+++ /dev/null
-###############################################################################
-# IPFire.org - An Open Source Firewall Solution #
-# Copyright (C) - IPFire Development Team <info@ipfire.org> #
-###############################################################################
-
-name = llvm
-version = 15.0.6
-release = 1
-
-groups = Applications/System
-url = http://llvm.org
-license = NCSA
-summary = The Low Level Virtual Machine.
-
-description
- LLVM is a compiler infrastructure designed for compile-time, link-time,
- runtime, and idle-time optimization of programs from arbitrary programming
- languages. The compiler infrastructure includes mirror sets of programming
- tools as well as libraries with equivalent functionality.
-end
-
-source_dl = https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/
-sources = %{thisapp}.src.tar.xz cmake-%{version}.src.tar.xz
-
-build
- requires
- binutils >= 2.32
- cmake >= 3.14.5
- gcc
- gcc-c++
- libedit-devel >= 3.1-20190324
- libffi-devel
- libxml2-devel
- ncurses-devel
- python3-setuptools
- python3-psutil
- zlib-devel
- end
-
- # Disable LTO so that we won't use >= 100G of disk space
- #LTO_CFLAGS =
-
- # We limit /tmp to 1G which is exceeded by the linker
- # when linking libLLVM.so
- #export TMPDIR = /var/tmp
-
- export LD_LIBRARY_PATH = %{DIR_APP}/build/lib64
-
- DIR_APP = %{DIR_SRC}/%{thisapp}.src
-
- # Set suffix for libdir based on the build architecture.
- llvm_libdir_suffix =
-
- if "%{DISTRO_ARCH}" == "x86_64"
- llvm_libdir_suffix = 64
- end
-
- if "%{DISTRO_ARCH}" == "aarch64"
- llvm_libdir_suffix = 64
- end
-
- # Only build with minimal debuginfo due to its large size
- CFLAGS += -DNDEBUG -g1
-
- prepare_cmds
- ln -svf --relative %{DIR_SRC}/cmake-%{version}.src %{DIR_SRC}/cmake
- end
-
- build
- # Create and switch into build directory.
- mkdir -pv %{DIR_APP}/build
- cd %{DIR_APP}/build
-
- %{cmake} .. \
- -DLLVM_PARALLEL_LINK_JOBS=1 \
- -DBUILD_SHARED_LIBS=OFF \
- -DBUILD_STATIC_LIBS=OFF \
- -DCMAKE_SKIP_RPATH=ON \
- \
- -DLLVM_LIBDIR_SUFFIX=%{llvm_libdir_suffix} \
- \
- -DLLVM_TARGETS_TO_BUILD="host;" \
- -DLLVM_ENABLE_FFI=ON \
- -DLLVM_ENABLE_RTTI=ON \
- -DLLVM_ENABLE_LIBCXX=OFF \
- -DLLVM_ENABLE_ZLIB=ON \
- -DLLVM_USE_PERF=ON \
- \
- -DLLVM_BUILD_RUNTIME=ON \
- \
- -DLLVM_INCLUDE_TOOLS=ON \
- -DLLVM_BUILD_TOOLS=ON \
- \
- -DLLVM_INCLUDE_TESTS=ON \
- -DLLVM_BUILD_TESTS=ON \
- \
- -DLLVM_INCLUDE_EXAMPLES=ON \
- -DLLVM_BUILD_EXAMPLES=OFF \
- \
- -DLLVM_BUILD_UTILS=ON \
- \
- -DLLVM_INCLUDE_DOCS=ON \
- -DLLVM_BUILD_DOCS=ON \
- \
- -DLLVM_INCLUDE_BENCHMARKS=OFF \
- \
- -DLLVM_BUILD_LLVM_DYLIB=ON \
- -DLLVM_LINK_LLVM_DYLIB=ON \
- -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
- -DLLVM_DEFAULT_TARGET_TRIPLE=%{DISTRO_BUILDTARGET}
-
- # Build LLVM first to avoid running out of space
- make %{PARALLELISMFLAGS} LLVM
-
- # Then build the rest
- make %{PARALLELISMFLAGS}
- end
-
- # The testsuite hangs for forever
- #test
- # cd %{DIR_APP}/build
- #
- # make check-all %{PARALELLISMFLAGS} || :
- #end
-
- install
- cd %{DIR_APP}/build
-
- make install DESTDIR=%{BUILDROOT}
- end
-end
-
-packages
- package llvm
-
- package llvm-libs
- template LIBS
- end
-
- package llvm-devel
- template DEVEL
- end
-
- package %{name}-debuginfo
- template DEBUGINFO
- end
-end