From 27d318e4d4a93f8eefdebfc6e02f13a32258dc65 Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Thu, 29 May 2025 08:14:17 +0200 Subject: [PATCH] v.builder: enable -fwrap for C compilation on OpenBSD too (#24585) --- vlib/v/builder/cc.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' }