Commit f263656b authored by Matthias Mayr's avatar Matthias Mayr
Browse files

Feature: Adds an option for debug builds.

parent f43f2312
......@@ -90,6 +90,7 @@ def options(opt):
opt.add_option('--regression_benchmarks', type='string', help='config file (json) to compile benchmark for regression', dest='regression_benchmarks')
opt.add_option('--cpp14', action='store_true', default=False, help='force c++-14 compilation [--cpp14]', dest='cpp14')
opt.add_option('--no-native', action='store_true', default=False, help='disable -march=native, which can cause some troubles [--no-native]', dest='no_native')
opt.add_option('--debug-build', action='store_true', default=False, help='build a debugging build with limited optimization', dest='debug_build')
......@@ -139,7 +140,10 @@ def configure(conf):
common_flags = "-Wall -std=c++11"
if conf.env.CXX_NAME in ["clang", "llvm"]:
common_flags += " -fdiagnostics-color"
opt_flags = " -O3 -g"
if conf.env.debug_build:
opt_flags = " -Og -g"
opt_flags = " -O3 -g"
if is_cpp14:
common_flags = common_flags + " -std=c++14"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment