Release: https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.5 Major Changes and Fixes: -- CMake 3.20 minimum required -- Issue encountered during standalone LLVM build: CMake Error at CMakeLists.txt:8 (include): include could not find requested file: This error is due to the line: include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake) Upstream commit [1] harmonized policy handling by introducing this shared include for all LLVM sub-projects. However, in the LLVM CMakeLists, LLVM_COMMON_CMAKE_UTILS is set unconditionally, preventing external override — which is required in Buildroot when building from separated archives. To solve this: We apply a patch to wrap the assignment of LLVM_COMMON_CMAKE_UTILS in an `if(NOT DEFINED ...)` block, allowing Buildroot to set the path externally. In the `llvm-cmake` package, we also **adjust the installation path** of the CMake modules: instead of installing directly into `lib/cmake/llvm`, we now install them under `lib/cmake/llvm/Modules` to match the expected layout. This ensures that: LLVM can include `${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake` without errors. -- Also the Clang build system has removed support for the GCC_INSTALL_PREFIX option, raising a fatal error when attempting to use it: CMake Error at CMakeLists.txt:211 (message): GCC_INSTALL_PREFIX is deprecated and will be removed. Use configuration files (https://clang.llvm.org/docs/UsersManual.html#configuration-files) to specify the default --gcc-install-dir= or --gcc-triple=. --gcc-toolchain= is discouraged. See https://github.com/llvm/llvm-project/pull/77537 for details. Remove the use of GCC_INSTALL_PREFIX and replace it with a Clang configuration file as recommended by upstream. A configuration file is now automatically generated at: $(HOST_DIR)/lib/clang/$(CLANG_VERSION_MAJOR)/$(GNU_TARGET_NAME).cfg It contains: --gcc-install-dir=<path to external toolchain's lib/gcc/...> --target=<GNU target triplet> We dynamically detect the GCC install path by scanning $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/lib/gcc/<target>/<version>/ The Clang toolchain wrapper was also updated to add --config=<file> when BR_CLANG_CONFIG_FILE is defined. -- Fix LLVM_MAIN_SRC_DIR path: set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH ...) This path isn't correct when using standalone archive builds. We explicitly pass LLVM_MAIN_SRC_DIR=$(BUILD_DIR)/llvm-$(LLVM_PROJECT_VERSION) to fix the path. [2] -- Add LLVM_ENABLE_RUNTIMES: Upstream added LLVM_ENABLE_RUNTIMES for runtimes [3] -- Removed LLVM_INCLUDE_GO_TESTS: Upstream dropped this option; we remove it too [4] -- Disable TensorFlow Lite integration: LLVM_HAVE_TFLITE is added to the CMakelist We now explicitly disable it to avoid unexpected TensorFlow Lite dependency. -- Clang introduced CLANG_ENABLE_LIBXML2 [5] We now explicitly disable it by setting CLANG_ENABLE_LIBXLM2=OFF since we set LLVM_ENABLE_LIBXML2 to OFF in LLVM -- Host-python3, which is now always needed by Clang’s resource bundling script. [6] -- Clang explicitly request to disable llvm tests when llvm_gtest is missing.[7] CMake Error at CMakeLists.txt:126 (message): llvm-gtest not found. Please install llvm-gtest or disable tests with -DLLVM_INCLUDE_TESTS=OFF -- Also update the installation path in COMPILER_RT_SETUP_RUNTIME_LIBS to use CLANG_VERSION_MAJOR instead of HOST_CLANG_VERSION, ensuring that the runtime files are placed correctly in the /lib/clang/<major>/ folder. [8] -- Add llvm-runtimes dependency libunwind needs runtimes [9] -- Fix for libclc out of tree patch Due to upstream changes in libclc, the old patch no longer applies. Only the fix related to invoking './prepare_builtins' directly is still relevant and preserved, as it is required to avoid a build failure when the binary is not in PATH. -- Upstream commit [10] removed the use of llvm-config in libclc and replaced it with proper use of LLVM_CMAKE_DIR. We now pass -DLLVM_CMAKE_DIR instead of DLLVM_CONFIG -- Libclc expects to invoke some LLVM tools. We explicitly set LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR to ensure it finds these tools. [11] -- Remove LLAsm_COMPILER and CLC_COMPILER [12] -- LIBUNWIND_INSTALL_HEADERS is On by default [13] -- Update spirv-llvm-translator to align with LLVM 20.1.5 Release: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/releases/tag/v20.1.2 [1] https://github.com/llvm/llvm-project/commit/9dd01a5241dc5b46e92485e05bc345221df8938c [2] https://github.com/llvm/llvm-project/commit/d2b158e29eedf4a29bf8d2142f2ed21a52fc80a7 [3] https://github.com/llvm/llvm-project/commit/176db3b3ab25ff8a9b2405f50ef5a8bd9304a6d5 [4] https://github.com/llvm/llvm-project/commit/6ce87272487711c9f0ff408a037f5ca2e1ff5c5d [5] https://github.com/llvm/llvm-project/commit/df239a6c17fa51274e38f185e72ac02c2f8fb914 [6] https://github.com/llvm/llvm-project/commit/96962d5512fbc6af0ada0f13e6be332c026529cb [7] https://github.com/llvm/llvm-project/commit/82169103958583d3320b3a9a1e6542e8d32ef8da [8] https://github.com/llvm/llvm-project/commit/e1b88c8a09be25b86b13f98755a9bd744b4dbf14 [9] https://github.com/llvm/llvm-project/commit/0af67d167d6c811abf12ad6c27ee34ec1365e5fb [10] https://github.com/llvm/llvm-project/commit/b264787453fd93e55154b98d18739ecb383d9b4c [11] https://github.com/llvm/llvm-project/commit/0aeeff3059e79b86f55ed92a4488bdee8fa66e12 [12] https://github.com/llvm/llvm-project/commit/72f9881c3ffcf4be6361c3e4312d91c9c8d94a98 [13] https://github.com/llvm/llvm-project/commit/f8409af354c1398ebf4ece67a315c94ba19714b5 Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr> Signed-off-by: Bernd Kuhls <bernd@kuhls.net> [Bernd: rebased, removed gcc-15 patches for llvm 15, bumped to 20.1.5] used 'git describe' to set the version number for spirv-llvm-translator] [Mehdi: changed llvm-runtimes version to $(LLVM_PROJECT_VERSION)] Signed-off-by: Julien Olivain <ju.o@free.fr>
17 lines
571 B
Plaintext
17 lines
571 B
Plaintext
config BR2_PACKAGE_HOST_LLD
|
|
bool "host lld"
|
|
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS # llvm
|
|
depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm
|
|
select BR2_HOST_CMAKE_AT_LEAST_3_20 # cmake required version at least 3.20
|
|
help
|
|
LLD is a linker from the LLVM project that is a drop-in
|
|
replacement for system linkers, and runs much faster than
|
|
them. It also provides features that are useful for
|
|
toolchain developers.
|
|
|
|
https://lld.llvm.org/
|
|
|
|
comment "host lld needs host gcc >= 7"
|
|
depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
|
|
depends on !BR2_HOST_GCC_AT_LEAST_7
|