From 152ad88d1db03a1e90e97980751dbe8c77aa0031 Mon Sep 17 00:00:00 2001 From: Bertrand Bellenot Date: Thu, 16 Jul 2026 13:15:44 +0200 Subject: [PATCH] [cmake][interop][win] Fix compiler error C1128 Fix the following error on Windows when compiling with ASAN=ON: interpreter\CppInterOp\lib\CppInterOp\CppInterOp.cpp(1,1): error C1128: number of sections exceeded object file format limit: compile with /bigobj --- interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt b/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt index e184c930b9bbb..05ae3721e1a84 100644 --- a/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt +++ b/interpreter/CppInterOp/lib/CppInterOp/CMakeLists.txt @@ -275,3 +275,6 @@ string(REPLACE ";" "\;" _VER CPPINTEROP_VERSION) set_source_files_properties(CppInterOp.cpp PROPERTIES COMPILE_DEFINITIONS "LLVM_BINARY_DIR=\"${LLVM_BINARY_DIR}\";CPPINTEROP_VERSION=\"${_VAR}\"" ) +if(MSVC) + set_source_files_properties(CppInterOp.cpp COMPILE_FLAGS /bigobj) +endif()