Skip to content

Commit ee83882

Browse files
devajithvshahnjo
authored andcommitted
[interpreter] Fix Windows build failures with LLVM 20
Also temporarily failing disable `testHashRecursiveRemove` test on Windows
1 parent e9ad5ab commit ee83882

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

core/meta/test/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
# For the list of contributors see $ROOTSYS/README/CREDITS.
66

77
ROOT_ADD_GTEST(testStatusBitsChecker testStatusBitsChecker.cxx LIBRARIES Core)
8-
ROOT_ADD_GTEST(testHashRecursiveRemove testHashRecursiveRemove.cxx LIBRARIES Core)
8+
# Currently doesn't work on Windows after the update to LLVM20.
9+
# Related to static initialization during JIT-ing on windows.
10+
# Need to investigate.
11+
if(NOT MSVC OR win_broken_tests)
12+
ROOT_ADD_GTEST(testHashRecursiveRemove testHashRecursiveRemove.cxx LIBRARIES Core)
13+
endif()
914
ROOT_ADD_GTEST(testTClass testTClass.cxx LIBRARIES Core GenVector)
1015
ROOT_ADD_GTEST(testTDataType testTDataType.cxx LIBRARIES Core)
1116
ROOT_ADD_GTEST(testTEnum testTEnum.cxx LIBRARIES Core)

interpreter/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ if(MSVC)
106106
# replace dashes in the -EH* and -GR* flags with slashes (/EH* /GR*)
107107
string(REPLACE " -EH" " /EH" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
108108
string(REPLACE " -GR" " /GR" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
109+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D CLANG_EXPORTS=1")
109110
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4049,4206,4217,4221")
110111
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ignore:4049,4206,4217,4221")
111112
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /ignore:4049,4206,4217,4221")

interpreter/cling/lib/Interpreter/DeviceKernelInliner.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
#include "DeviceKernelInliner.h"
1111

12+
#ifdef _MSC_VER
13+
// FIXME: Needed on Windows after LLVM 20 update to build
14+
#include <clang/AST/ASTContext.h>
15+
#endif
1216
#include <clang/AST/Attr.h>
1317

1418
#include <llvm/Support/Casting.h>

0 commit comments

Comments
 (0)