Skip to content
Permalink
Browse files

Remove -Og from Debug

Causes more trouble than it's worth
  • Loading branch information...
tatokis committed Dec 4, 2018
1 parent 57cdf16 commit 2b7b3e4b57362fabc8b8fee235ec9a0ca80c252b
Showing with 2 additions and 19 deletions.
  1. +2 −19 cmake/modules/CkbNextCompileFlags.cmake
@@ -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

0 comments on commit 2b7b3e4

Please sign in to comment.
You can’t perform that action at this time.