Skip to content

Commit

Permalink
v.builder: fix errors in cstrict mode on OpenBSD with clang (#22154)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcheylus committed Sep 3, 2024
1 parent 0a61b4a commit f61a4f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vlib/v/builder/cc.v
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
}
}

// Fix 'braces around scalar initializer' errors
// on OpenBSD with clang for cstrict mode
if v.pref.os == .openbsd && ccoptions.cc == .clang {
ccoptions.wargs << '-Wno-braced-scalar-init'
}

if ccompiler != 'msvc' && v.pref.os != .freebsd {
ccoptions.wargs << '-Werror=implicit-function-declaration'
}
Expand Down

0 comments on commit f61a4f1

Please sign in to comment.