<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/97163>97163</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
crash when compile debug version of LLVM: CompilerInvocation.cpp:4015:
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sommersun
</td>
</tr>
</table>
<pre>
I use this cmd to compile:
`cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS="bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;lld;lldb;mlir;openmp;polly;pstl;flang" -DLLVM_TARGETS_TO_BUILD=RISCV -DCMAKE_BUILD_TYPE="Debug" -DLLVM_INCLUDE_TESTS=OFF -DCMAKE_INSTALL_PREFIX="/home/xiaoxia/debug_llvm/llvm_build" ../llvm`
```
crash log :
```
[ 41%] Building LLVM bitcode Workshare.cpp-sm_90.bc
clang-18: /home/xiaoxia/debug_llvm/llvm-project-main/clang/lib/Frontend/CompilerInvocation.cpp:4015: clang::CompilerInvocation::ParseLangArgs(clang::LangOptions&, llvm::opt::ArgList&, clang::InputKind, const llvm::Triple&, std::vector<std::__cxx11::basic_string<char> >&, clang::DiagnosticsEngine&)::<lambda(const llvm::Triple&)>: Assertion `T.isArch64Bit() && "Expected 64-bit architecture"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/xiaoxia/debug_llvm/llvm-project-main/build/bin/clang-18 -cc1 -triple unknown -emit-llvm-bc -emit-llvm-uselists -disable-free -clear-ast-before-backend -main-file-name Workshare.cpp -mrelocation-model static -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -debugger-tuning=gdb -fdebug-compilation-dir=/home/xiaoxia/debug_llvm/llvm-project-main/build/projects/openmp/libomptarget/DeviceRTL -fcoverage-compilation-dir=/home/xiaoxia/debug_llvm/llvm-project-main/build/projects/openmp/libomptarget/DeviceRTL -nostdsysteminc -nobuiltininc -resource-dir /home/xiaoxia/debug_llvm/llvm-project-main/build/lib/clang/18 -dependency-file Workshare.cpp-sm_90.bc.d -MT Workshare.cpp-sm_90.bc -sys-header-deps -D SHARED_SCRATCHPAD_SIZE=512 -D OMPTARGET_DEVICE_RUNTIME -I /home/xiaoxia/debug_llvm/llvm-project-main/openmp/libomptarget/DeviceRTL/include -I /home/xiaoxia/debug_llvm/llvm-project-main/openmp/libomptarget/DeviceRTL/../include -I /home/xiaoxia/debug_llvm/llvm-project-main/llvm/include -I /home/xiaoxia/debug_llvm/llvm-project-main/build/include -O3 -Wno-unknown-cuda-version -std=c++17 -fdeprecated-macro -ferror-limit 19 -fvisibility=hidden -fopenmp -fopenmp-cuda-mode -nogpulib -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -openmp-opt-disable -mllvm -vectorize-slp=false -disable-llvm-passes -fopenmp-targets=nvptx-nvidia-cuda -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/Workshare-sm_90-ced38b.bc -x c++ /home/xiaoxia/debug_llvm/llvm-project-main/openmp/libomptarget/DeviceRTL/src/Workshare.cpp
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 clang-18 0x0000559c8d8338dc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 88
1 clang-18 0x0000559c8d833cf8
2 clang-18 0x0000559c8d831145 llvm::sys::RunSignalHandlers() + 150
3 clang-18 0x0000559c8d833174
4 libc.so.6 0x00007fd19f4a6520
5 libc.so.6 0x00007fd19f4fa9fc pthread_kill + 300
6 libc.so.6 0x00007fd19f4a6476 raise + 22
7 libc.so.6 0x00007fd19f48c7f3 abort + 211
8 libc.so.6 0x00007fd19f48c71b
9 libc.so.6 0x00007fd19f49de96
10 clang-18 0x0000559c8e84000e
11 clang-18 0x0000559c8e8531ec clang::CompilerInvocation::ParseLangArgs(clang::LangOptions&, llvm::opt::ArgList&, clang::InputKind, llvm::Triple const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, clang::DiagnosticsEngine&) + 78294
12 clang-18 0x0000559c8e85c6da clang::CompilerInvocation::CreateFromArgsImpl(clang::CompilerInvocation&, llvm::ArrayRef<char const*>, clang::DiagnosticsEngine&, char const*) + 1406
13 clang-18 0x0000559c8e85ce6d
14 clang-18 0x0000559c8e864294
15 clang-18 0x0000559c8e86bece
16 clang-18 0x0000559c8e7e2b85
17 clang-18 0x0000559c8e85cfbb clang::CompilerInvocation::CreateFromArgs(clang::CompilerInvocation&, llvm::ArrayRef<char const*>, clang::DiagnosticsEngine&, char const*) + 241
18 clang-18 0x0000559c8bf064ee cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 876
19 clang-18 0x0000559c8bef5fee
20 clang-18 0x0000559c8bef6561 clang_main(int, char**, llvm::ToolContext const&) + 850
21 clang-18 0x0000559c8bf316af main + 78
22 libc.so.6 0x00007fd19f48dd90
23 libc.so.6 0x00007fd19f48de40 __libc_start_main + 128
24 clang-18 0x0000559c8bef4425 _start + 37
clang-18: error: unable to execute command: Aborted
clang-18: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 18.0.0git
Target: unknown
Thread model: posix
InstalledDir: /home/xiaoxia/debug_llvm/llvm-project-main/build/projects/openmp/libomptarget/DeviceRTL/../../../../bin
clang-18: note: diagnostic msg: Error generating preprocessed source(s).
gmake[2]: *** [projects/openmp/libomptarget/DeviceRTL/CMakeFiles/omptarget.devicertl.dir/build.make:4585: projects/openmp/libomptarget/DeviceRTL/Workshare.cpp-sm_90.bc] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:86541: projects/openmp/libomptarget/DeviceRTL/CMakeFiles/omptarget.devicertl.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
```
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMOVtzozjWv0Z5UckFwmD8kAds7Gl_k3SnEnfPN_NCCXGwtQGJkkTamV-_JYETJx339GVnd6pSAaRz17npmBkjdhLgEsULFOcXrLd7pS-NalvQppcXpaoeLze4N4DtXhjM2wpbhblqO9EAijIU5CjIUBLwlt0DJr9gROlHKQ74mt1DLRowiFJM8qurT9fF6n22uFoVN7cf_m-13N6hKEeUlqqxKFrwhsnd8UmsUo0hcLCaubWBnybaQ2plDOm0-hdwSywYa1C0aETJx0fjX5pq-F-iaNE2QqNooTqQbYeiRaea5tE9jW1QtKg972c5t9ntL6vtXbH9UCw-bq5yFOW3m7vlJ0zy5XX262pYLba_36wGHXIo-1MCm_fLq4_5qtiu7ryaH9brJ9zN-7ttdnVV3Nyu1pv_H_ARXe9VC4iuD4Kpg2CIritHs2iahxbRtXsUZS-aynGZTMYllARPJzD--U-umdnjRu3w8xm9BYfiBZ6GiMYozvHCkRdyh50KuBSWqwrwb0rfmz3TMOFdR0xbzINJyUc2_qzCFEUZ_iYVnk6tZUIiuh4Ona4bUSK6XmslLcgK0fVyPPGNfFCcWaGkY4-ibBqEsWM3ukuGouxL2GH9hmkDV0zuMr0ziKYnKG71Q-dADaIJokvshfR7qrPDS6Z3V8LYEeAEeyO73v4qnKBLzJU09gR9q0XXwIhkbDWsPgC3SqNo-bRSFPxwCMPho2RG8MJYLRyPJd8zjaIVRtHqS-65YDupjBXcrOROyIHXfNhE0bJhbVkxp-95yeaOcpThzBjQzgwYJcF2Ikym-T6ZLoRFNEV0jj104oJ6deiAW6hwMiWlsJhpvhcWuO01eA-e4ZqJBqrJ4Bs3V6vsboVNX7YOGpf9DmvolLYug-yt7YwTi64RXe-E3fflhKujn7xyF0TXwpje5ZI1ZrLCQvKmr1xSAjz4esn4vdWMg7NWp6HTioMxUGGjej0sO0xmjOKCOUV0L7HhWn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