| Issue |
60607
|
| Summary |
[clang] HAVE_CLANG_REPL_SUPPORT is being set to ON on Windows and the Visual C++ build fails
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
cristianadam
|
On Windows with LLVM/Clang `16.0.0-rc2` tag I can't build clang due to the fact that the `HAVE_CLANG_REPL_SUPPORT` is being set to `ON` due to how the CMake code is being written.
Visual C++ will fail to link `clang-repl.exe` due to the big number of symbols.
The following code allows me to build by setting the `HAVE_CLANG_REPL_SUPPORT` to `OFF` when configuring LLVM/Clang.
```diff
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 090cfa352078..51e471bbbeb0 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -411,7 +411,7 @@ CMAKE_DEPENDENT_OPTION(CLANG_PLUGIN_SUPPORT
# If libstdc++ is statically linked, clang-repl needs to statically link libstdc++
# itself, which is not possible in many platforms because of current limitations in
# JIT stack. (more platforms need to be supported by JITLink)
-if(NOT LLVM_STATIC_LINK_CXX_STDLIB)
+if(NOT LLVM_STATIC_LINK_CXX_STDLIB AND NOT DEFINED HAVE_CLANG_REPL_SUPPORT)
set(HAVE_CLANG_REPL_SUPPORT ON)
endif()
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs