From 7423b214290f8a9a535ef39769dc0c76adf53ab8 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 10 Oct 2019 04:00:13 +0300 Subject: [PATCH] cc: fix -g --- .travis.yml | 2 +- compiler/cc.v | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 }