mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.builder: add -Wl,--allow-multiple-definition
when targeting FreeBSD
This commit is contained in:
parent
0121c8b4fd
commit
9ca99c6f93
@ -318,6 +318,10 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
|||||||
if ccoptions.debug_mode && os.user_os() != 'windows' && v.pref.build_mode != .build_module {
|
if ccoptions.debug_mode && os.user_os() != 'windows' && v.pref.build_mode != .build_module {
|
||||||
ccoptions.linker_flags << '-rdynamic' // needed for nicer symbolic 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
|
||||||
|
ccoptions.linker_flags << '-Wl,--allow-multiple-definition'
|
||||||
|
}
|
||||||
|
|
||||||
if ccompiler != 'msvc' && v.pref.os != .freebsd {
|
if ccompiler != 'msvc' && v.pref.os != .freebsd {
|
||||||
ccoptions.wargs << '-Werror=implicit-function-declaration'
|
ccoptions.wargs << '-Werror=implicit-function-declaration'
|
||||||
|
Loading…
Reference in New Issue
Block a user