Skip to content

Commit

Permalink
Remove -Og from Debug
Browse files Browse the repository at this point in the history
Causes more trouble than it's worth
  • Loading branch information
tatokis committed Dec 4, 2018
1 parent 57cdf16 commit 2b7b3e4
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions cmake/modules/CkbNextCompileFlags.cmake
Expand Up @@ -27,29 +27,12 @@

# Compiler-related stuff specific to ckb-next

# CMAKE_CXX_FLAGS_DEBUG is -g
# CMAKE_CXX_FLAGS_DEBUG is -g -O0
# CMAKE_CXX_FLAGS_RELEASE is -O3 -DNDEBUG
# CMAKE_CXX_FLAGS_RELWITHDEBINFO is -O2 -g -DNDEBUG
# CMAKE_CXX_FLAGS_MINSIZEREL is -Os -DNDEBUG

# Check for -Og for better debugging

# GCC supports it since 4.8.0
# clang supports it since 4.0.0
# Apple's Clang supports it since 9.0.0

include(CheckCCompilerFlag)
check_c_compiler_flag("-Og" C_COMPILER_SUPPORTS_-Og)

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-Og" CXX_COMPILER_SUPPORTS_-Og)

if (C_COMPILER_SUPPORTS_-Og)
set(opt_lvl "-Og")
else ()
set(opt_lvl "-O0")
endif ()

set(opt_lvl "-O0")
set(CKB_NEXT_COMMON_COMPILE_FLAGS "")
list(APPEND CKB_NEXT_COMMON_COMPILE_FLAGS
-fsigned-char
Expand Down

0 comments on commit 2b7b3e4

Please sign in to comment.