Open llvmbot opened 3 years ago
In the master version I found: llvm/cmake/modules/HandleLLVMOptions.cmake: append("/bigobj" CMAKE_CXX_FLAGS)
so here it looks like to be solved, maybe a port back for 11.0 would be in place.
In the mean time I found another place in 11.0: file: clang-tools-extra\clang-tidy\modernize\CMakeLists.txt missing: if (MSVC) set_source_files_properties(LoopConvertCheck.cpp PROPERTIES COMPILE_FLAGS /bigobj) endif()
Not that in the master version I still found: clang/lib/ARCMigrate/CMakeLists.txt: set_source_files_properties(Transforms.cpp PROPERTIES COMPILE_FLAGS /bigobj)
Aaron, didn't we fix the CMake files to turn /bigobj on unconditionally instead of doing it file-by-file? I remember there was talk about it.
Yeah, wasn't that done by https://reviews.llvm.org/rG80bd6ae13ea23d453a1f45d6ccdbfc7d0c877bb0 in order to address llvm/llvm-project#46078 ?
Aaron, didn't we fix the CMake files to turn /bigobj on unconditionally instead of doing it file-by-file? I remember there was talk about it.
Looks like the file: clang/lib/ARCMigrate/CMakeLists.txt
in the master version has been corrected for this with:
if (MSVC) set_source_files_properties(Transforms.cpp PROPERTIES COMPILE_FLAGS /bigobj) endif()
Probably this should be ported back to version 11.0 as well
Extended Description
I try to compile LLVM version 11.0 with 64-bit Windows compiler and I get: [ 72%] Building CXX object tools/clang/lib/ARCMigrate/CMakeFiles/obj.clangARCMigrate.dir/Transforms.cpp.obj Transforms.cpp E:\Programs\LLVM\11.0\llvm-project\clang\lib\ARCMigrate\Transforms.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
How to overcome this problem (or is it a bug)?
Mote important information (as far as I can see) from cmake stage:
cmake -G "NMake Makefiles" -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra ..\llvm -- The C compiler identification is MSVC 19.16.27034.0 -- The CXX compiler identification is MSVC 19.16.27034.0 -- The ASM compiler identification is MSVC -- Found assembler: D:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works