summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-01-07 20:31:03 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-01-07 20:31:03 +0000
commit53bf3ee82ba9fb6e6008b9752d4f8f4e71a4bfe4 (patch)
treefc8454872de6a8f1abedd10a93fa6acad41ef527 /CMakeLists.txt
parent8e3914d12e939d7c686bd121b0e2b2d39ed126d2 (diff)
downloadllvm-53bf3ee82ba9fb6e6008b9752d4f8f4e71a4bfe4.tar.gz
llvm-53bf3ee82ba9fb6e6008b9752d4f8f4e71a4bfe4.tar.bz2
llvm-53bf3ee82ba9fb6e6008b9752d4f8f4e71a4bfe4.tar.xz
Don't use -O3 on Mingw, as people report it as unreliable. Use -O2
instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f48b58f43..5e27c6f82e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -317,6 +317,12 @@ if( MINGW )
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}${LLVM_SYSTEM_LIBS}")
endif()
+if( MINGW )
+ # People report that -O3 is unreliable on MinGW. The traditional
+ # build also uses -O2 for that reason:
+ llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
+endif()
+
add_subdirectory(lib/Support)
# Everything else depends on Support: