ref: de388d38b4f791585e9ec9e4f47a11e9ebcdb569
parent: 6d59f515a10835ce68c22e374a51b571c7a3bd0b
author: cancel <cancel@cancel.fm>
date: Fri Jan 17 07:08:40 EST 2020
Add -Wno-missing-field-initializers on Mac clang
--- a/tool
+++ b/tool
@@ -236,6 +236,14 @@
if [[ $cc_id = tcc ]]; then
add cc_flags -Wunsupported
fi
+ if [[ $os = mac && $cc_id = clang ]]; then
+ # The clang that's shipped with Mac 10.12 has bad behavior for issuing
+ # warnings for structs initialed with {0} in C99. We have to disable this
+ # warning, or it will issue a bunch of useless warnings. It might be fixed
+ # in later versions, but Apple makes the version of clang/LLVM
+ # indecipherable, so we'll just always turn it off.
+ add cc_flags -Wno-missing-field-initializers
+ fi
if [[ $lld_detected = 1 ]]; then
add cc_flags -fuse-ld=lld
fi