From e2c9bf152849e244effa38d0654d3246e0399810 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aaron@aaronballman.com>
Date: Tue, 8 Mar 2016 16:34:37 +0000
Subject: [PATCH] Turning on the /bigobj flag for two more files that will not
 link with MSVC 2015 Win64 Debug due to the section limit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262938 91177308-0d34-0410-b5e6-96231b3b80d8
---
 unittests/ASTMatchers/CMakeLists.txt | 6 ++++++
 unittests/Tooling/CMakeLists.txt     | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/unittests/ASTMatchers/CMakeLists.txt b/unittests/ASTMatchers/CMakeLists.txt
index 3ace9fe264b..81d36ea99ab 100644
--- a/unittests/ASTMatchers/CMakeLists.txt
+++ b/unittests/ASTMatchers/CMakeLists.txt
@@ -2,6 +2,12 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
+# By default MSVC has a 2^16 limit on the number of sections in an object file,
+# and this needs more than that.
+if (MSVC)
+  set_source_files_properties(ASTMatchersTest.cpp PROPERTIES COMPILE_FLAGS /bigobj)
+endif()
+
 add_clang_unittest(ASTMatchersTests
   ASTMatchersTest.cpp)
 
diff --git a/unittests/Tooling/CMakeLists.txt b/unittests/Tooling/CMakeLists.txt
index 3035fdcc015..607a903ce3d 100644
--- a/unittests/Tooling/CMakeLists.txt
+++ b/unittests/Tooling/CMakeLists.txt
@@ -3,6 +3,12 @@ set(LLVM_LINK_COMPONENTS
   Support
   )
 
+# By default MSVC has a 2^16 limit on the number of sections in an object file,
+# and this needs more than that.
+if (MSVC)
+  set_source_files_properties(RecursiveASTVisitorTestExprVisitor.cpp PROPERTIES COMPILE_FLAGS /bigobj)
+endif()
+
 add_clang_unittest(ToolingTests
   CommentHandlerTest.cpp
   CompilationDatabaseTest.cpp
-- 
GitLab