<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Clang unit test build failure with fatal error C1128: number of sections exceeded"
href="https://llvm.org/bugs/show_bug.cgi?id=26089">26089</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang unit test build failure with fatal error C1128: number of sections exceeded
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>libclang
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jujjyl@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>klimek@google.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Building trunk on Windows with Visual Studio 2015 gives
<span class="quote">>src\tools\clang\unittests\Tooling\RecursiveASTVisitorTestExprVisitor.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj</span >
<span class="quote">>src\tools\clang\unittests\ASTMatchers\ASTMatchersTest.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj</span >
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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>