[msan] Disable tail call optimization in msan rtl.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 27 Dec 2018 00:21:20 +0000 (00:21 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 27 Dec 2018 00:21:20 +0000 (00:21 +0000)
This should give us better error stack traces on the bots, in
particular, for https://bugs.llvm.org/show_bug.cgi?id=40162

llvm-svn: 350080

compiler-rt/lib/msan/CMakeLists.txt

index 15cc513..1fd0be1 100644 (file)
@@ -38,6 +38,11 @@ endif()
 # Prevent clang from generating libc calls.
 append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding MSAN_RTL_CFLAGS)
 
+# Tracking down https://bugs.llvm.org/show_bug.cgi?id=40162
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+  list(APPEND MSAN_RTL_CFLAGS -fno-optimize-sibling-calls)
+endif()
+
 set(MSAN_RUNTIME_LIBRARIES)
 
 # Static runtime library.