New commits:
commit 9c4c49ad36c77d3dce4c8d28eabfedaf8bcdc676
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
devel/llvm: fix and improve builds, add more support
Fix the support for SPIR-V and make the target, project, and runtime
selection and usage in BUILD more robust.
Correct CLANG_ to LLVM_ for the setting name that enables/disables Z3
solver support.
Add support for building SPIR-V and Vulkan runners in MLIR.
Explicitly set or unset the option for enabling doxygen documentation in
the build rather than relying on the build system to correctly pick it
up automatically based on the presence or absence of doxygen in the host
system. Explicitly include clang-tools-extra in the projects to build,
and explicitly ensure that the LLVM utilities are installed as well as
built if the user enables them.
Leave the linker choice as-is in PREPARE and manipulate the selection
string in BUILD instead. When the selected linker is lld (or equivalent
to it, even via symlink as the system linker), force the LLVM_ENABLE_LLD
setting to on to ensure that the LLVM build takes advantage of using
lld.
commit 9e8a9ffe60c1a80527b341bfd63a30c978ba85a3
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
vulkan/spirv-headers: update to 1.3.290.0
commit bd461796e448bd57311e72b556f7959c3a178018
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
# recommended by mesa project
OPTS="$OPTS -DLLVM_LINK_LLVM_DYLIB=1" &&
@@ -40,7 +42,7 @@ if [[ "$LLVM_WITH_BOLT" == y ]] ;then
fi &&
if [[ "$LLVM_WITH_CLANG" == y ]] ;then
- LLVM_PROJECTS="$LLVM_PROJECTS clang" &&
+ LLVM_PROJECTS="$LLVM_PROJECTS clang;clang-tools-extra" &&
OPTS="$OPTS -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=ON" &&
OPTS="$OPTS -DCLANG_INCLUDE_BENCHMARKS=OFF" &&
OPTS="$OPTS -DCLANG_INCLUDE_TESTS=OFF"
@@ -74,7 +76,10 @@ fi &&
if [[ "$LLVM_WITH_MLIR" == y ]] ;then
LLVM_PROJECTS="$LLVM_PROJECTS mlir" &&
OPTS="$OPTS -DLLVM_TOOL_MLIR_BUILD=ON" &&
- OPTS="$OPTS -DMLIR_ENABLE_PYTHON_BENCHMARKS=OFF"
+ OPTS="$OPTS -DMLIR_ENABLE_PYTHON_BENCHMARKS=OFF" &&
+ if [[ "$LLVM_WITH_SPIRV" == y ]] ;then
+ OPTS="$OPTS -DMLIR_ENABLE_SPIRV_CPU_RUNNER=ON"
+ fi
fi &&
if [[ "$LLVM_WITH_POLLY" == y ]] ;then
@@ -83,14 +88,16 @@ if [[ "$LLVM_WITH_POLLY" == y ]] ;then
fi &&
if [[ "$LLVM_WITH_SPIRV" == y ]] ;then
- OPTS="$OPTS -DLLVM_EXPERIMENTAL_TARGETS=SPIRV" &&
- OPTS="$OPTS -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv"
+ OPTS="$OPTS -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv" &&
+ OPTS="$OPTS -DLLVM_TOOL_SPIRV_BUILD=ON"
fi &&
if [[ "$LLVM_WITH_UTILS" == y ]] ;then
OPTS="$OPTS -DLLVM_BUILD_UTILS=ON"
+ OPTS="$OPTS -DLLVM_INSTALL_UTILS=ON"
else
OPTS="$OPTS -DLLVM_BUILD_UTILS=OFF"
+ OPTS="$OPTS -DLLVM_INSTALL_UTILS=OFF"
fi &&
if list_find "$LLVM_RUNTIMES" "compiler-rt" ;then
@@ -100,7 +107,7 @@ fi &&
if list_find "$LLVM_RUNTIMES" "libcxx" ;then
OPTS="$OPTS -DLLVM_TOOL_LIBCXX_BUILD=ON" &&
- # libcxx includes benchmarks by default, which in turn depend ON
+ # libcxx includes benchmarks by default, which in turn depend on
# google-benchmark, so disable them
OPTS="$OPTS -DLIBCXX_INCLUDE_BENCHMARKS=OFF"
fi &&
@@ -131,9 +138,26 @@ if [ -n "$LLVM_TOOLCHAIN_COMPILER" ] ;then
fi
@@ -57,6 +58,12 @@ if [[ "$LLVM_WITH_LLDB" == y ]]; then
buildsys_depends ncurses
fi &&
+if [[ "$LLVM_WITH_MLIR" == y ]]; then
+ buildsys_optional_depends vulkan-loader \
+ -o MLIR_ENABLE_VULKAN_RUNNER \
+ "Build the MLIR Vulkan runner?"
+fi &&
+
if [[ "$LLVM_WITH_SPIRV" == y ]]; then
buildsys_depends spirv-headers &&
buildsys_depends spirv-tools
diff --git a/devel/llvm/HISTORY b/devel/llvm/HISTORY
index 0dbd0ab..4907e4f 100644
--- a/devel/llvm/HISTORY
+++ b/devel/llvm/HISTORY
@@ -1,3 +1,13 @@
+2025-01-17 Justin Boffemmyer <flux AT sourcemage.org>
+ * BUILD: fix experimental targets, make clang-tools-extra build
+ explicit, support SPIR-V runner for MLIR, make utils install
+ explicit, improve linker handling
+ * DEPENDS: fix Z3 option, make doxygen option explicit, support Vulkan
+ runner for MLIR
+ * PREPARE: move linker processing to BUILD, fix experimental target
+ processing
+ * PRE_BUILD: fix typo in SPIRV_VERSION variable usage, quote filenames
+
2025-01-16 Justin Boffemmyer <flux AT sourcemage.org>
* BUILD: add a workaround for building libclc
diff --git a/devel/llvm/PREPARE b/devel/llvm/PREPARE
index 59ab14c..2333b1a 100755
--- a/devel/llvm/PREPARE
+++ b/devel/llvm/PREPARE
@@ -105,13 +105,6 @@ config_query_list LLVM_TOOLCHAIN_LINKER \
"Which linker to use to link llvm and its components?" \
$linkers &&
-case "$LLVM_TOOLCHAIN_LINKER" in
- default)
- LLVM_TOOLCHAIN_LINKER="SYSTEM"
- persistent_add LLVM_TOOLCHAIN_LINKER
- ;;
-esac
-
config_query LLVM_WITH_RTTI "Enable RTTI? (recommended)" y &&
config_query LLVM_WITH_UTILS "Build the LLVM utilities?" y &&
config_query LLVM_WITH_BOLT "Build BOLT?" n &&
@@ -162,5 +155,16 @@ if [[ "$LLVM_WITH_LLD" == y ]] ;then
done
fi &&