From d33bfb0d42a117f0495f304921343a209a2441a4 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Mon, 11 Mar 2013 22:45:44 +0100 Subject: [PATCH] LLVM 3.1: Use -O1 instead of -O3 for std.exception tests. --- runtime/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index f7a146c0..87d17dd1 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -599,7 +599,16 @@ function(add_tests module_files) endfunction() testcase(debug "-g;-d-debug") - testcase(release "-O3;-release") + + # Building the std.exception tests on x86_64 triggers an infinite + # recursion in scalar evolution on LLVM 3.1 (only), see the list of + # known LLVM bugs for details. + if(${LDC_LLVM_VER} EQUAL 301 AND ${HOST_BITNESS} EQUAL 64 AND + "${testroot}" STREQUAL "phobos_std_exception") + testcase(release "-O1;-release") + else() + testcase(release "-O3;-release") + endif() # On 64 bit multilib builds, run the tests in 32 bit mode as well. if(MULTILIB AND ${HOST_BITNESS} EQUAL 64)