diff --git a/.travis.yml b/.travis.yml index 8f86d0a401..68d9ab9077 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,5 +86,5 @@ script: if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then # Build Vid git clone https://github.com/vlang/vid - cd vid && ../v -debug -o vid . + cd vid && ../v -o vid . fi diff --git a/compiler/cc.v b/compiler/cc.v index 4ee57d417a..2a4dec43af 100644 --- a/compiler/cc.v +++ b/compiler/cc.v @@ -72,10 +72,10 @@ fn (v mut V) cc() { println('Building ${v.out_name}...') } - mut debug_options := '-g' + mut debug_options := '' mut optimization_options := '-O2' if v.pref.ccompiler.contains('clang') { - if v.pref.is_debug { + if v.pref.is_debuggable { debug_options = '-g -O0' } optimization_options = '-O3 -flto' @@ -94,7 +94,7 @@ fn (v mut V) cc() { a << debug_options } - if v.pref.is_debug && os.user_os() != 'windows'{ + if v.pref.is_debuggable && os.user_os() != 'windows'{ a << ' -rdynamic ' // needed for nicer symbolic backtraces }