Skip to content

Commit 0d596a4

Browse files
authored
[runtime] Adopt safer native compiler flags: report numerous other warnings (#24093)
None of these warnings trigger in our code base at the moment. References: * https://developer.apple.com/documentation/xcode/enabling-enhanced-security-for-your-app * https://releases.llvm.org/8.0.0/tools/clang/docs/ReleaseNotes.html#major-new-features (for -ftrivial-auto-var-init=zero) Contributes towards #23023.
1 parent 03c368d commit 0d596a4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mk/rules.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ macos_DEFINES=-DMONOMAC
2525
OBJC_CFLAGS=-ObjC++ -std=c++14 -fno-exceptions -fno-objc-msgsend-selector-stubs -fobjc-abi-version=2 -fobjc-legacy-dispatch
2626
CFLAGS=\
2727
-Wall \
28+
-Wextra \
29+
-Wno-unused-parameter \
30+
-Wno-unused-but-set-parameter \
2831
-fms-extensions \
2932
-Werror \
3033
-Wconversion \
@@ -43,7 +46,15 @@ CFLAGS=\
4346
-Wsemicolon-before-method-body \
4447
-Wsign-compare \
4548
-Wshadow \
49+
-Wempty-body \
50+
-Wbuiltin-memcpy-chk-size \
4651
-Wformat-nonliteral \
52+
-Warray-bounds \
53+
-Warray-bounds-pointer-arithmetic \
54+
-Wsuspicious-memaccess \
55+
-Wsizeof-array-div \
56+
-Wsizeof-pointer-div \
57+
-Wreturn-stack-address \
4758
-g \
4859
-I.
4960
SWIFTFLAGS=-g -emit-library

0 commit comments

Comments
 (0)