From 83c5d8ecbf019a4f3cea6874566a5631764d3d9b Mon Sep 17 00:00:00 2001 From: _ov4 Date: Wed, 14 Oct 2026 09:21:29 +0000 Subject: build(toolchain)!: require LLVM and Clang 23 Reject other compiler and LLVM major versions and remove GCC compiler fallbacks. Adapt string globals, block termination checks and the embedded target triple to LLVM 23 without changing pseudocode behavior. Co-Authored-By: Claude Fable 5.1 --- cmake/BuildTools.cmake | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'cmake') diff --git a/cmake/BuildTools.cmake b/cmake/BuildTools.cmake index d6928bb..e2d3e2f 100644 --- a/cmake/BuildTools.cmake +++ b/cmake/BuildTools.cmake @@ -2,15 +2,20 @@ if(CMAKE_GENERATOR MATCHES "Makefiles|Ninja") foreach(language C CXX) if(language STREQUAL "C") - set(names clang cc gcc) + set(names clang-23 clang) + set(compiler_environment CC) else() - set(names clang++ c++ g++) + set(names clang++-23 clang++) + set(compiler_environment CXX) endif() if(CMAKE_${language}_COMPILER) - get_filename_component(requested "${CMAKE_${language}_COMPILER}" NAME) - list(INSERT names 0 "${requested}") + if(NOT IS_ABSOLUTE "${CMAKE_${language}_COMPILER}") + cpsc_find_dependency(PROGRAM CMAKE_${language}_COMPILER + NAMES "${CMAKE_${language}_COMPILER}" REQUIRED) + endif() + elseif("$ENV{${compiler_environment}}" STREQUAL "") + cpsc_find_dependency(PROGRAM CMAKE_${language}_COMPILER NAMES ${names} REQUIRED) endif() - cpsc_find_dependency(PROGRAM CMAKE_${language}_COMPILER NAMES ${names} REQUIRED) # project() would otherwise restore the previous path from this file. set(compiler_info "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}/CMake${language}Compiler.cmake") if(EXISTS "${compiler_info}") -- cgit v1.3.1-4-g156e