tint: Bump stack size for MSVC + debug build
Bug: tint:1749 Change-Id: Ic7a87a769ade9c459914ac745b449b4383812753 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108923 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
parent
5071a54af4
commit
ba200e87c5
|
@ -752,6 +752,7 @@ if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Tests
|
# Tests
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -1351,7 +1352,16 @@ if(TINT_BUILD_TESTS)
|
||||||
add_executable(tint_unittests ${TINT_TEST_SRCS})
|
add_executable(tint_unittests ${TINT_TEST_SRCS})
|
||||||
set_target_properties(${target} PROPERTIES FOLDER "Tests")
|
set_target_properties(${target} PROPERTIES FOLDER "Tests")
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(MSVC)
|
||||||
|
# TODO(crbug.com/tint/1749): MSVC debug builds can suffer from stack
|
||||||
|
# overflows when resolving deeply nested expression chains or statements.
|
||||||
|
# Production builds neither use MSVC nor debug, so just bump the stack size
|
||||||
|
# for this build combination.
|
||||||
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
|
||||||
|
if ((NOT ${build_type} STREQUAL "RELEASE") AND (NOT ${build_type} STREQUAL "RELWITHDEBINFO"))
|
||||||
|
target_link_options(tint_unittests PRIVATE "/STACK 2097152") # 2MB, default is 1MB
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
target_compile_options(tint_unittests PRIVATE
|
target_compile_options(tint_unittests PRIVATE
|
||||||
-Wno-global-constructors
|
-Wno-global-constructors
|
||||||
-Wno-weak-vtables
|
-Wno-weak-vtables
|
||||||
|
|
Loading…
Reference in New Issue