v.builder: enable -fwrap for C compilation on OpenBSD too (#24585)

This commit is contained in:
Laurent Cheylus 2025-05-29 08:14:17 +02:00 committed by GitHub
parent c6dbe323f4
commit 27d318e4d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'
}