diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index 532ea273c4..a1b092429e 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -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' }