Skip to content

Commit

Permalink
builder: fix cross compiling from linux to windows, when passing -g/-cg
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Nov 13, 2024
1 parent 4aa8779 commit 7c3c589
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vlib/v/builder/cc.v
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ 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 {
ccoptions.linker_flags << '-rdynamic' // needed for nicer symbolic backtraces
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 {
Expand Down

0 comments on commit 7c3c589

Please sign in to comment.