1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cc: fix -g

This commit is contained in:
Alexander Medvednikov 2019-10-10 04:00:13 +03:00
parent 48e13a3362
commit 7423b21429
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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
}