https://github.com/hamidelmaazouz created https://github.com/llvm/llvm-project/pull/178221
Add missing includes `#include <cstdint>` to make the build pass. >From c83f527a2bf477751ec35b6580789707588b29f3 Mon Sep 17 00:00:00 2001 From: Hamid El Maazouz <[email protected]> Date: Tue, 27 May 2025 00:06:00 +0100 Subject: [PATCH 1/2] [cmake] Introduce LLVM_DISABLE_PROJECTS to easily exclude projects --- llvm/CMakeLists.txt | 5 +++++ llvm/docs/CMake.rst | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 12618966c4adf..7240ff77c1760 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -125,6 +125,11 @@ set(LLVM_ENABLE_PROJECTS "" CACHE STRING if( LLVM_ENABLE_PROJECTS STREQUAL "all" ) set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS}) endif() + +foreach(proj ${LLVM_DISABLE_PROJECTS}) + list(REMOVE_ITEM LLVM_ENABLE_PROJECTS "${proj}") +endforeach () + foreach(proj ${LLVM_ENABLE_PROJECTS}) if (NOT proj STREQUAL "llvm" AND NOT "${proj}" IN_LIST LLVM_KNOWN_PROJECTS) MESSAGE(FATAL_ERROR "${proj} isn't a known project: ${LLVM_KNOWN_PROJECTS}. Did you mean to enable it as a runtime in LLVM_ENABLE_RUNTIMES?") diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst index 2a80813999ea1..c7be830cefa2f 100644 --- a/llvm/docs/CMake.rst +++ b/llvm/docs/CMake.rst @@ -429,6 +429,14 @@ enabled sub-projects. Nearly all of these variable names begin with of the machine where LLVM is being built. If you are building a cross-compiler, set it to the target triple of your desired architecture. +**LLVM_DISABLE_PROJECTS**:STRING + Semicolon-separated list of projects to exclude from the build. Sometimes it is + more convenient to exclude a few projects than to have to enumerate all other + projects. This flag can be combined with ``LLVM_ENABLE_PROJECTS`` to easily + select projects of interest in the build. For example, the command: + ``cmake ... -DLLVM_ENABLE_PROJECTS=all -DLLVM_DISABLE_PROJECTS=libclc ...`` + allows to build all projects but ``libclc``. + **LLVM_DOXYGEN_QCH_FILENAME**:STRING The filename of the Qt Compressed Help file that will be generated when ``-DLLVM_ENABLE_DOXYGEN=ON`` and >From c493f4b0fda41cc5559af47f15cad5ca6b22b38f Mon Sep 17 00:00:00 2001 From: Hamid El Maazouz <[email protected]> Date: Tue, 27 May 2025 12:10:01 +0100 Subject: [PATCH 2/2] [mlir] Build issue fixes in Affine dialect and SPIRV target --- .../include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h | 2 ++ mlir/include/mlir/Target/SPIRV/Deserialization.h | 2 ++ mlir/include/mlir/Target/SPIRV/Serialization.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h b/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h index 451c466fa0c95..efc36e46465d9 100644 --- a/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h +++ b/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h @@ -9,6 +9,8 @@ #ifndef MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H #define MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H +#include <cstdint> + #include "mlir/Support/LLVM.h" namespace mlir { diff --git a/mlir/include/mlir/Target/SPIRV/Deserialization.h b/mlir/include/mlir/Target/SPIRV/Deserialization.h index e39258beeaac8..c20dac4f6c1e9 100644 --- a/mlir/include/mlir/Target/SPIRV/Deserialization.h +++ b/mlir/include/mlir/Target/SPIRV/Deserialization.h @@ -13,6 +13,8 @@ #ifndef MLIR_TARGET_SPIRV_DESERIALIZATION_H #define MLIR_TARGET_SPIRV_DESERIALIZATION_H +#include <cstdint> + #include "mlir/IR/OwningOpRef.h" #include "mlir/Support/LLVM.h" diff --git a/mlir/include/mlir/Target/SPIRV/Serialization.h b/mlir/include/mlir/Target/SPIRV/Serialization.h index 613f0a423f9f8..2075ed64fe8ab 100644 --- a/mlir/include/mlir/Target/SPIRV/Serialization.h +++ b/mlir/include/mlir/Target/SPIRV/Serialization.h @@ -13,6 +13,8 @@ #ifndef MLIR_TARGET_SPIRV_SERIALIZATION_H #define MLIR_TARGET_SPIRV_SERIALIZATION_H +#include <cstdint> + #include "mlir/Support/LLVM.h" namespace mlir { _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
