Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Build ROOT with Clang and libc++ instead of GNU libstdc++ on Linux.
# The Fedora 44 image provides clang and libcxx/libcxxabi-devel packages.
CMAKE_C_COMPILER=clang
CMAKE_CXX_COMPILER=clang++
CMAKE_GENERATOR=Ninja
CMAKE_CXX_STANDARD=20
soversion=ON
libcxx=ON
davix=OFF
tpython=OFF
minuit2_omp=OFF
# All C++ dependencies must be built with the same toolchain: the ones
# shipped by the distribution are compiled with libstdc++ and are ABI
# incompatible with a libc++ ROOT build.
builtin_civetweb=ON
builtin_fftw3=ON
builtin_freetype=ON
builtin_ftgl=ON
builtin_gif=ON
builtin_gl2ps=ON
builtin_gtest=ON
builtin_gsl=ON
builtin_jpeg=ON
builtin_lz4=ON
builtin_lzma=ON
builtin_nlohmann=ON
builtin_pcre=ON
builtin_png=ON
builtin_tbb=ON
builtin_tiff=ON
builtin_unuran=ON
builtin_vdt=ON
builtin_xrootd=ON
builtin_xxhash=ON
builtin_zlib=ON
builtin_zstd=ON
test_distrdf_dask=OFF
test_distrdf_pyspark=OFF
5 changes: 5 additions & 0 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
matrix:
# Specify platform + optional build option overrides
# Build options: https://root.cern/install/build_from_source/#all-build-options
platform: [mac26, mac27, mac-beta]

Check failure on line 123 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

label "mac27" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows", "mac14", "mac15", "mac26", "mac-beta", "cpu", "latest", "preview". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
arch: [ARM64]
include:
- platform: mac15
Expand All @@ -132,7 +132,7 @@
- self-hosted
- ${{ matrix.platform }}

name: |

Check failure on line 135 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "overrides" is not defined in object type {arch: string; is_special: bool; platform: string}
${{ matrix.platform }} ${{ matrix.arch }}
${{ (github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && join( matrix.overrides, ', ' )) || '' }}

Expand All @@ -151,8 +151,8 @@
if: github.event_name == 'pull_request'
env:
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
OVERRIDES: ${{ join( matrix.overrides, ' ') }}

Check failure on line 154 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "overrides" is not defined in object type {arch: string; is_special: bool; platform: string}
run: |

Check failure on line 155 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
[ -d "${VIRTUAL_ENV_DIR}" ] && source ${VIRTUAL_ENV_DIR}/bin/activate
echo "Python is now $(which python3) $(python3 --version)"
src/.github/workflows/root-ci-config/build_root.py \
Expand Down Expand Up @@ -430,6 +430,11 @@
is_special: true
property: "clang Ninja builtins auto-registration off"
overrides: ["CMAKE_CXX_STANDARD=20"]
# Fedora 44 with Clang and libc++ instead of GNU libstdc++
- image: fedora44
platform_config: fedora44-clang_libcxx
is_special: true
property: "clang Ninja libc++"
# Asan build
- image: alma10
platform_config: alma10-asan
Expand Down
12 changes: 10 additions & 2 deletions interpreter/cling/lib/Interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,19 @@ if (UNIX)
endif()
endif()

# If CMAKE_CXX_FLAGS selects the C++ standard library (e.g. -stdlib=libc++
# with a clang that defaults to libstdc++), cling has to look up the headers
# of that library, not the ones of the compiler default.
string(REGEX MATCH "-stdlib=[^ ]+" cling_cxx_stdlib "${CMAKE_CXX_FLAGS}")
if (cling_cxx_stdlib AND CLING_CXX_RLTV)
set(CLING_CXX_RLTV "${CLING_CXX_RLTV} ${cling_cxx_stdlib}")
endif()

if(NOT CLING_CXX_HEADERS)
if (CLING_CXX_PATH)
execute_process(COMMAND ${CLING_CXX_PATH} ${CLING_CXX_PATH_ARGS} -xc++ -E -v /dev/null
execute_process(COMMAND ${CLING_CXX_PATH} ${CLING_CXX_PATH_ARGS} ${cling_cxx_stdlib} -xc++ -E -v /dev/null
OUTPUT_QUIET ERROR_VARIABLE CLING_CXX_HEADERS)
set(CLING_CXX_PATH "${CLING_CXX_PATH} ${CLING_CXX_PATH_ARGS}")
set(CLING_CXX_PATH "${CLING_CXX_PATH} ${CLING_CXX_PATH_ARGS} ${cling_cxx_stdlib}")
else()
# convert CMAKE_CXX_FLAGS to a list for execute_process
string(REPLACE "-fdiagnostics-color=always" "" cling_tmp_arg_list ${CMAKE_CXX_FLAGS})
Expand Down
Loading