Skip to content
Merged
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
14 changes: 14 additions & 0 deletions interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ if(builtin_llvm)

set(LLVM_ENABLE_PROJECTS "clang" CACHE STRING "")

# Always build LLVM with C++17. It is not necessary to compile with the same
# C++ standard as the rest of ROOT and sometimes it doesn't even work.
set(_cxx_standard ${CMAKE_CXX_STANDARD})
set(CMAKE_CXX_STANDARD 17)

#---Reduce log level to suppress STATUS messages from LLVM
if(NOT DEFINED CMAKE_MESSAGE_LOG_LEVEL)
set(CMAKE_MESSAGE_LOG_LEVEL "NOTICE")
Expand All @@ -226,6 +231,8 @@ if(builtin_llvm)
unset(CMAKE_MESSAGE_LOG_LEVEL)
endif()

set(CMAKE_CXX_STANDARD ${_cxx_standard})

set(LLVM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/llvm-project/llvm/include
${CMAKE_CURRENT_BINARY_DIR}/llvm-project/llvm/include
CACHE STRING "LLVM include directories."
Expand Down Expand Up @@ -372,7 +379,14 @@ else()
# Disable linking against shared LLVM
set(LLVM_LINK_LLVM_DYLIB OFF)

# Always build LLVM with C++17. It is not necessary to compile with the same
# C++ standard as the rest of ROOT and sometimes it doesn't even work.
set(_cxx_standard ${CMAKE_CXX_STANDARD})
set(CMAKE_CXX_STANDARD 17)

add_subdirectory(llvm-project/clang EXCLUDE_FROM_ALL)

set(CMAKE_CXX_STANDARD ${_cxx_standard})
endif(builtin_clang)

set( CLANG_BUILT_STANDALONE 1 )
Expand Down
2 changes: 1 addition & 1 deletion interpreter/llvm-project/llvm-project.tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ROOT-llvm18-20250225-01
ROOT-llvm18-20250313-01
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,13 @@ ScopedPrinter::printHex<support::ulittle16_t>(StringRef Label,
startLine() << Label << ": " << hex(Value) << "\n";
}

struct DelimitedScope;
struct DelimitedScope {
DelimitedScope(ScopedPrinter &W) : W(&W) {}
DelimitedScope() : W(nullptr) {}
virtual ~DelimitedScope() = default;
virtual void setPrinter(ScopedPrinter &W) = 0;
ScopedPrinter *W;
};

class JSONScopedPrinter : public ScopedPrinter {
private:
Expand Down Expand Up @@ -838,14 +844,6 @@ class JSONScopedPrinter : public ScopedPrinter {
}
};

struct DelimitedScope {
DelimitedScope(ScopedPrinter &W) : W(&W) {}
DelimitedScope() : W(nullptr) {}
virtual ~DelimitedScope() = default;
virtual void setPrinter(ScopedPrinter &W) = 0;
ScopedPrinter *W;
};

struct DictScope : DelimitedScope {
explicit DictScope() = default;
explicit DictScope(ScopedPrinter &W) : DelimitedScope(W) { W.objectBegin(); }
Expand Down
Loading