mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: pass -no-pie in debug builds so that backtraces work
This commit is contained in:
parent
e15abb3de0
commit
15d4f68af6
@ -118,13 +118,13 @@ fn (v mut V) cc() {
|
|||||||
mut optimization_options := '-O2'
|
mut optimization_options := '-O2'
|
||||||
if v.pref.ccompiler.contains('clang') {
|
if v.pref.ccompiler.contains('clang') {
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
debug_options = '-g -O0'
|
debug_options = '-g -O0 -no-pie'
|
||||||
}
|
}
|
||||||
optimization_options = '-O3 -flto'
|
optimization_options = '-O3 -flto'
|
||||||
}
|
}
|
||||||
if v.pref.ccompiler.contains('gcc') {
|
if v.pref.ccompiler.contains('gcc') {
|
||||||
if debug_mode {
|
if debug_mode {
|
||||||
debug_options = '-g3'
|
debug_options = '-g3 -no-pie'
|
||||||
}
|
}
|
||||||
optimization_options = '-O3 -fno-strict-aliasing -flto'
|
optimization_options = '-O3 -fno-strict-aliasing -flto'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user