mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
builder: fix cross compiling from linux to windows, when passing -g/-cg
This commit is contained in:
parent
4aa87796ed
commit
7c3c5891b0
1 changed files with 4 additions and 1 deletions
|
@ -319,9 +319,12 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
|||
if ccoptions.cc != .tcc && current_os == 'macos' {
|
||||
ccoptions.linker_flags << '-Wl,-export_dynamic' // clang for mac needs export_dynamic instead of -rdynamic
|
||||
} else {
|
||||
if v.pref.ccompiler != 'x86_64-w64-mingw32-gcc' {
|
||||
// the mingw-w64-gcc cross compiler does not support -rdynamic, and windows/wine already does have nicer backtraces
|
||||
ccoptions.linker_flags << '-rdynamic' // needed for nicer symbolic backtraces
|
||||
}
|
||||
}
|
||||
}
|
||||
if v.pref.os == .freebsd {
|
||||
// Needed for -usecache on FreeBSD 13, otherwise we get `ld: error: duplicate symbol: _const_math__bits__de_bruijn32` errors there
|
||||
if ccoptions.cc != .tcc {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue