Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #61 from binarycrusader/rust-llvm-2016-10-29
Browse files Browse the repository at this point in the history
use -O0 when building release LLVM on sparc
  • Loading branch information
alexcrichton authored and arielb1 committed Jun 27, 2017
2 parents b5fb3b2 + b67bc62 commit 43d93d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,12 @@ if( MINGW )
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
endif()

if( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND "${LLVM_NATIVE_ARCH}" MATCHES "Sparc" )
# gcc 4.x, 5.x (at least) generate bad code on sparc above -O0 when compiling
# llvm; notably llvm-tblgen consistently core dumps.
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O0")
endif()

# Put this before tblgen. Else we have a circular dependence.
add_subdirectory(lib/Demangle)
add_subdirectory(lib/Support)
Expand Down

0 comments on commit 43d93d5

Please sign in to comment.