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

use -O3 with some optimizations disabled on sparc w/ gcc #62

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,10 @@ 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")
# llvm. Notably llvm-tblgen consistently core dumps, *unless*
# -fno-delayed-branch is specified. Finally, -fno-omit-frame-pointer is
# included to avoid additional code generation and debugging issues.
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O3 -fno-delayed-branch -fno-omit-frame-pointer")
endif()

# Put this before tblgen. Else we have a circular dependence.
Expand Down