I have built Clang with MinGW on Windows with the target triple x86_64-w64-windows-gnu. The executables clang.exe and clang++.exe work as expected if I build them in release mode (they compile programs without error), however when building in debug mode I cannot run them and get this error - "This app can't run on your PC". Other executables from the same build such as clang-check.exe do not display this error and run correctly.
It seems as though this could be an issue with the file size as both clang.exe and clang++.exe are > 2GB in size whereas the other executables are smaller but I was under the impression that the file size limit on 64-bit Windows is 4GB.
Has anyone else run into a similar issue? If the file size is the problem, is it possible to get LLVM to put the debug symbols in a separate file to reduce the size of the executable?
EDIT: I've tried to reduce the executable size by dumping the debug symbols to a separate file using the -gsplit-dwarf flag when building LLVM but it doesn't have any effect.