| Issue |
54726
|
| Summary |
Segment fault when compiling LLVM with LLVM_ENABLE_MODULES=ON
|
| Labels |
|
| Assignees |
|
| Reporter |
junaire
|
When I try to build LLVM with `-DLLVM_ENABLE_MODULES=ON`, everything is totally fine. But when I `checkout ` another branch, for example, my working branch `fix`, or switch back from `fix` to `main`, it will report a "segment fault" and recompile some stuff.
Here are the screenshots:

You can notice that there's a message "segment fault`, but the interesting thing is that it won't stop but will recompile more files. (The CXX objects need to be built increased from 225 to about 1000.
OS: Ubuntu 20.04 LTS
Compiler:
```
clang version 15.0.0 (https://github.com/llvm/llvm-project/ 8133778d3c8d481891143e21e0c5081a02a9889d)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jun/opt/clang/bin
```
Linker: lld
Ninja version: 1.10.0
CMake config command:
```
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=YES \
-DLLVM_USE_LINKER=lld \
-DLLVM_TARGETS_TO_BUILD=X86\
-DBUILD_SHARED_LIBS=ON \
-DLLVM_CCACHE_BUILD=ON \
-DLLVM_APPEND_VC_REV=OFF \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \
-G"Ninja" ../llvm \
-DLLVM_ENABLE_MODULES=ON
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs