diff options
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/tests')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt index 259c10316eb..64964a83780 100644 --- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt @@ -78,6 +78,13 @@ if(ANDROID) list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON -pie) endif() +# MSVC linker is allocating 1M for the stack by default, which is not +# enough for the unittests. Some unittests require more than 2M. +# The default stack size for clang is 8M. +if(MSVC) + list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON -Wl,/STACK:0x8000000) +endif() + set(SANITIZER_TEST_LINK_LIBS) append_list_if(COMPILER_RT_HAS_LIBLOG log SANITIZER_TEST_LINK_LIBS) # NDK r10 requires -latomic almost always. diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc index 55888d487e3..20f8f53975d 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc @@ -13,10 +13,6 @@ #include "gtest/gtest.h" #include "sanitizer_common/sanitizer_flags.h" -#ifdef _MSC_VER -#pragma comment(linker, "/STACK:33554432") -#endif - const char *argv0; int main(int argc, char **argv) { |

