From fa3d7ce11c68573fe2e10c400f12a0193fcf2a80 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 12 May 2026 11:56:16 +0200 Subject: [PATCH] doc: Document minimum versions for Xcode CLT and MSVC --- CMakeLists.txt | 9 +-------- cmake/module/CheckCXXFeatures.cmake | 8 +++----- doc/build-osx.md | 4 +++- doc/dependencies.md | 4 +++- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36644bd2184..9dec916de18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,9 +80,6 @@ if(CMAKE_VERSION VERSION_LESS 4.2 AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NO set(CMAKE_INSTALL_NAME_TOOL "${CMAKE_COMMAND} -E true") endif() enable_language(CXX) -set(MIN_CLANG_DOCS "doc/dependencies.md#compiler") -set(MIN_GCC_DOCS "doc/dependencies.md#compiler") -set(MIN_MSVC_DOCS "doc/build-windows-msvc.md") set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -201,11 +198,7 @@ string(APPEND CMAKE_CXX_COMPILE_OBJECT " ${APPEND_CPPFLAGS} ${APPEND_CXXFLAGS}") string(APPEND CMAKE_CXX_CREATE_SHARED_LIBRARY " ${APPEND_LDFLAGS}") string(APPEND CMAKE_CXX_LINK_EXECUTABLE " ${APPEND_LDFLAGS}") -#============================= -# C++ Feature Detection -#============================= -# In case the compiler is not GCC, Clang or MSVC this provides extra checks -# which verify that some features are available in the standard library. +# Check required C++ toolchain features early. include(CheckCXXFeatures) check_cxx_features() diff --git a/cmake/module/CheckCXXFeatures.cmake b/cmake/module/CheckCXXFeatures.cmake index b3760a7ee46..fde630e30d0 100644 --- a/cmake/module/CheckCXXFeatures.cmake +++ b/cmake/module/CheckCXXFeatures.cmake @@ -4,7 +4,7 @@ include_guard(GLOBAL) -#Checks for C++ features required to compile Bitcoin Core. +# Checks for C++ features required to compile Bitcoin Core. include(CheckCXXSourceCompiles) @@ -33,10 +33,8 @@ function(check_cxx_features) "Compiler lacks Class Template Argument Deduction (CTAD) for aggregates.\n" "This C++ feature is required for src/util/overloaded.h.\n" "You are probably using an old compiler version\n" - "The recommended compiler versions can be checked in:\n" - " - GCC -> ${MIN_GCC_DOCS}\n" - " - Clang -> ${MIN_CLANG_DOCS}\n" - " - MSVC -> ${MIN_MSVC_DOCS}\n" + "The recommended compiler versions can be checked in\n" + "doc/dependencies.md#compiler.\n" ) endif() diff --git a/doc/build-osx.md b/doc/build-osx.md index 669185c0405..a6a2d3befe8 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -16,7 +16,9 @@ macOS comes with a built-in Terminal located in: ### 1. Xcode Command Line Tools The Xcode Command Line Tools are a collection of build tools for macOS. -These tools must be installed in order to build Bitcoin Core from source. +Version 16.2 (or higher) of these tools must be +[installed](https://developer.apple.com/documentation/xcode/installing-the-command-line-tools) +in order to build Bitcoin Core from source. To install, run the following command from your terminal: diff --git a/doc/dependencies.md b/doc/dependencies.md index aac4bb90a08..5e1a19487e9 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -8,10 +8,12 @@ them using [depends](/depends/README.md). Bitcoin Core requires one of the following compilers. -| Dependency | Minimum required | +| Toolchain | Minimum required | | --- | --- | | [Clang](https://clang.llvm.org) | [17.0](https://github.com/bitcoin/bitcoin/pull/33555) | | [GCC](https://gcc.gnu.org) | [12.1](https://github.com/bitcoin/bitcoin/pull/33842) | +| [Xcode CLT](/doc/build-osx.md) | [16.2](https://github.com/bitcoin/bitcoin/pull/33932) | +| [MSVC](/doc/build-windows-msvc.md) | [18.3](https://github.com/bitcoin/bitcoin/pull/33861) | ## Required