mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
fix the build issue for Win Arm64 Release build (#20475)
### Description Fix the build error for Win ARM64 Release build. graph_transform_test.cc(1,1): error C1128: number of sections exceeded object file format limit: compile with /bigobj [D:\build\Windows\Release\onnxruntime_test_all.vcxproj] ### Motivation and Context Fix issue: https://github.com/microsoft/onnxruntime/issues/20406
This commit is contained in:
parent
cc26b2dac2
commit
d2d4639ddb
1 changed files with 5 additions and 0 deletions
|
|
@ -876,6 +876,11 @@ if (MSVC)
|
|||
"$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:/wd26451>")
|
||||
target_compile_options(onnxruntime_test_all PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--compiler-options /wd4244>"
|
||||
"$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:/wd4244>")
|
||||
# Avoid the error for Win arm64 Release build. error C1128: number of sections exceeded object file format limit: compile with /bigobj
|
||||
string(TOLOWER ${onnxruntime_target_platform} GEN_PLATFORM)
|
||||
if (${GEN_PLATFORM} STREQUAL "arm64" AND "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
target_compile_options(onnxruntime_test_all PRIVATE "/bigobj")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(onnxruntime_test_all PRIVATE "-Wno-parentheses")
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in a new issue