Skip to content

Compiling LLVM fails and prompts file to big #57718

Open
@zky97

Description

@zky97

Build and compile environment
OS Windows11
python version 3.10.6
cmake version 3.24.1
ninja version 1.11.0
MinGW64 version 8.1.0_x86_64-posix-seh-rev0,
GNU Make version 4.2.1
RAM :64GB
SSD free space:>800GB
cmake command:

cmake -G "Ninja" ../llvm 
            -DCMAKE_BUILD_TYPE="Debug" 
            -DCMAKE_INSTALL_PREFIX="E:\LLVM\Build" 
            -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;cross-project-tests;libclc;lld;lldb;polly;bolt;mlir;flang" 
            -DLLVM_ENABLE_RUNTIMES="all" 
            -DCMAKE_CXX_STANDARD="17" 
            -DLLVM_ENABLE_Z3_SOLVER="ON" 
            -DLLVM_OPTIMIZED_TABLEGEN="ON" 
            -DLLVM_TARGET_ARCH="host" 
            -DLLVM_USE_CRT_DEBUG="MT" 
            -DPython3_INCLUDE_DIRS="C:\Program Files\Python310\include" 
            -DPython3_LIBRARIES="C:\Program Files\Python310\libs\python310_d.lib"

report an error:

[3405/8208] Building CXX object tools/clang/lib/ASTMatcher...MakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.obj
FAILED: tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.obj
C:\PROGRA~1\MINGW-~2\bin\C__~1.EXE -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:/LLVM/Source1/build/tools/clang/lib/ASTMatchers/Dynamic -IE:/LLVM/Source1/clang/lib/ASTMatchers/Dynamic -IE:/LLVM/Source1/clang/include -IE:/LLVM/Source1/build/tools/clang/include -IE:/LLVM/Source1/build/include -IE:/LLVM/Source1/llvm/include -IC:/ProgramFiles/Strawberry/c/include -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fno-common -Woverloaded-virtual -fno-strict-aliasing -g  -fno-exceptions -fno-rtti -std=c++17 -MD -MT tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.obj -MF tools\clang\lib\ASTMatchers\Dynamic\CMakeFiles\obj.clangDynamicASTMatchers.dir\Registry.cpp.obj.d -o tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.obj -c E:/LLVM/Source1/clang/lib/ASTMatchers/Dynamic/Registry.cpp
In file included from E:/LLVM/Source1/clang/include/clang/ASTMatchers/ASTMatchers.h:54,
                 from E:/LLVM/Source1/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:20,
                 from E:/LLVM/Source1/clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h:17,
                 from E:/LLVM/Source1/clang/include/clang/ASTMatchers/Dynamic/Registry.h:19,
                 from E:/LLVM/Source1/clang/lib/ASTMatchers/Dynamic/Registry.cpp:14:
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h: In instantiation of 'void clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::SkipToNextDecl() [with SpecificDecl = clang::ObjCPropertyDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCPropertyDecl::isInstanceProperty]':
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h:2292:7:   required from 'clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::filtered_decl_iterator(clang::DeclContext::decl_iterator) [with SpecificDecl = clang::ObjCPropertyDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCPropertyDecl::isInstanceProperty]'
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:983:43:   required from here
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:975:30: warning: the address '&clang::ObjCPropertyDecl::isInstanceProperty' will never be NULL [-Waddress]
  975 |                              &ObjCPropertyDecl::isInstanceProperty>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h: In instantiation of 'void clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::SkipToNextDecl() [with SpecificDecl = clang::ObjCPropertyDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCPropertyDecl::isClassProperty]':
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h:2292:7:   required from 'clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::filtered_decl_iterator(clang::DeclContext::decl_iterator) [with SpecificDecl = clang::ObjCPropertyDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCPropertyDecl::isClassProperty]'
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:1000:44:   required from here
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:992:30: warning: the address '&clang::ObjCPropertyDecl::isClassProperty' will never be NULL [-Waddress]
  992 |                              &ObjCPropertyDecl::isClassProperty>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h: In instantiation of 'void clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::SkipToNextDecl() [with SpecificDecl = clang::ObjCMethodDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCMethodDecl::isInstanceMethod]':
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h:2292:7:   required from 'clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::filtered_decl_iterator(clang::DeclContext::decl_iterator) [with SpecificDecl = clang::ObjCMethodDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCMethodDecl::isInstanceMethod]'
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:1034:43:   required from here
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:1026:30: warning: the address '&clang::ObjCMethodDecl::isInstanceMethod' will never be NULL [-Waddress]
 1026 |                              &ObjCMethodDecl::isInstanceMethod>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h: In instantiation of 'void clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::SkipToNextDecl() [with SpecificDecl = clang::ObjCMethodDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCMethodDecl::isClassMethod]':
E:/LLVM/Source1/clang/include/clang/AST/DeclBase.h:2292:7:   required from 'clang::DeclContext::filtered_decl_iterator<SpecificDecl, Acceptable>::filtered_decl_iterator(clang::DeclContext::decl_iterator) [with SpecificDecl = clang::ObjCMethodDecl; bool (SpecificDecl::* Acceptable)() const = &clang::ObjCMethodDecl::isClassMethod]'
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:1051:44:   required from here
E:/LLVM/Source1/clang/include/clang/AST/DeclObjC.h:1043:30: warning: the address '&clang::ObjCMethodDecl::isClassMethod' will never be NULL [-Waddress]
 1043 |                              &ObjCMethodDecl::isClassMethod>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/PROGRA~1/MINGW-~2/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/as.exe: tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.obj: section .pdata$_ZN4llvm23SmallVectorTemplateBaseIN5clang12ast_matchers8internal7MatcherINS1_24UnresolvedUsingValueDeclEEELb0EE19moveElementsForGrowEPS6_: string table overflow at offset 10000135
C:\Users\zky19\AppData\Local\Temp\ccNDgE2c.s: Assembler messages:
C:\Users\zky19\AppData\Local\Temp\ccNDgE2c.s: Fatal error: tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.obj: file too big
ninja: build stopped: subcommand failed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions