From 28c252c77e04ade343fdc816704b6906892a1274 Mon Sep 17 00:00:00 2001 From: Adrian Lizarraga Date: Tue, 20 Aug 2024 10:11:43 -0700 Subject: [PATCH] [QNN EP] Fix compile error for QNN EP on Windows x64 due to missing /bigobj flag (#21795) ### Description Compiling onnxruntime with QNN EP on Windows x86_64 results in a compilation error: ```shell $ onnxruntime\test\optimizer\qdq_transformer_test.cc(1,1): error C1128: num ber of sections exceeded object file format limit: compile with /bigobj [...onnxruntime\build\Debug\onnxruntime_test_all.vcxproj] ``` This PR adds the `/bigobj` compilation flag for the `qdq_transformer_test.cc` file. --- cmake/onnxruntime_unittests.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index d5c3af748e528..a02aeb5236881 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -887,9 +887,10 @@ if (MSVC) target_compile_options(onnxruntime_test_all PRIVATE "$<$:SHELL:--compiler-options /wd4244>" "$<$>:/wd4244>") - # Avoid this compile error in graph_transform_test.cc: + # Avoid this compile error in graph_transform_test.cc and qdq_transformer_test.cc: # fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj set_property(SOURCE "${TEST_SRC_DIR}/optimizer/graph_transform_test.cc" + "${TEST_SRC_DIR}/optimizer/qdq_transformer_test.cc" APPEND PROPERTY COMPILE_OPTIONS "/bigobj") else() target_compile_options(onnxruntime_test_all PRIVATE "-Wno-parentheses")