[llvm-bugs] [Bug 26089] New: Clang unit test build failure with fatal error C1128: number of sections exceeded

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 8 13:58:33 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26089

            Bug ID: 26089
           Summary: Clang unit test build failure with fatal error C1128:
                    number of sections exceeded
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jujjyl at gmail.com
                CC: klimek at google.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Building trunk on Windows with Visual Studio 2015 gives

>src\tools\clang\unittests\Tooling\RecursiveASTVisitorTestExprVisitor.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

>src\tools\clang\unittests\ASTMatchers\ASTMatchersTest.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

With the following modifications, VS2015 is satisfied (though not sure if this
is the cleanest way):

diff --git a/unittests/ASTMatchers/CMakeLists.txt
b/unittests/ASTMatchers/CMakeLists.txt
index 3ace9fe..8971091 100644
--- a/unittests/ASTMatchers/CMakeLists.txt
+++ b/unittests/ASTMatchers/CMakeLists.txt
@@ -5,6 +5,10 @@ set(LLVM_LINK_COMPONENTS
 add_clang_unittest(ASTMatchersTests
   ASTMatchersTest.cpp)

+if (MSVC)
+  set_source_files_properties(ASTMatchersTest.cpp PROPERTIES COMPILE_FLAGS
/bigobj)
+endif()
+
 target_link_libraries(ASTMatchersTests
   clangAST
   clangASTMatchers
diff --git a/unittests/Tooling/CMakeLists.txt
b/unittests/Tooling/CMakeLists.txt
index 33b2046..5a0e297 100644
--- a/unittests/Tooling/CMakeLists.txt
+++ b/unittests/Tooling/CMakeLists.txt
@@ -19,6 +19,10 @@ add_clang_unittest(ToolingTests
   ReplacementsYamlTest.cpp
   )

+if (MSVC)
+  set_source_files_properties(RecursiveASTVisitorTestExprVisitor.cpp
PROPERTIES COMPILE_FLAGS /bigobj)
+endif()
+
 target_link_libraries(ToolingTests
   clangAST
   clangASTMatchers

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160108/35fa9df2/attachment.html>


More information about the llvm-bugs mailing list