compiler: pass -no-pie in debug builds so that backtraces work

pull/2614/head
Delyan Angelov 2019-11-01 12:20:26 +02:00 committed by Alexander Medvednikov
parent e15abb3de0
commit 15d4f68af6
1 changed files with 2 additions and 2 deletions

View File

@ -118,13 +118,13 @@ fn (v mut V) cc() {
mut optimization_options := '-O2'
if v.pref.ccompiler.contains('clang') {
if debug_mode {
debug_options = '-g -O0'
debug_options = '-g -O0 -no-pie'
}
optimization_options = '-O3 -flto'
}
if v.pref.ccompiler.contains('gcc') {
if debug_mode {
debug_options = '-g3'
debug_options = '-g3 -no-pie'
}
optimization_options = '-O3 -fno-strict-aliasing -flto'
}