mirror of
https://github.com/vlang/v.git
synced 2025-09-15 10:27:19 -04:00
v.builder: enable -fwrap for C compilation on OpenBSD too (#24585)
This commit is contained in:
parent
c6dbe323f4
commit
27d318e4d4
@ -227,7 +227,7 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
||||
}
|
||||
|
||||
// Add -fwrapv to handle UB overflows
|
||||
if ccoptions.cc in [.gcc, .clang, .tcc] && v.pref.os in [.macos, .linux, .windows] {
|
||||
if ccoptions.cc in [.gcc, .clang, .tcc] && v.pref.os in [.macos, .linux, .openbsd, .windows] {
|
||||
ccoptions.args << '-fwrapv'
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user