Skip to content

Commit 6fd3184

Browse files
committed
Error on unguarded-availability-new in Darwin builds
1 parent 2a66dd3 commit 6fd3184

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Error on ``unguarded-availability-new`` in Darwin builds, preventing invalid
2+
use of symbols that are not available in older versions of the OS.

configure

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+7
Original file line numberDiff line numberDiff line change
@@ -2603,6 +2603,13 @@ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
26032603
esac
26042604
AC_MSG_RESULT([$CC])
26052605
2606+
# Error on unguarded use of new symbols, which will fail at runtime for
2607+
# users on older versions of macOS
2608+
AX_CHECK_COMPILE_FLAG([-Wunguarded-availability-new],
2609+
[AS_VAR_APPEND([CFLAGS_NODIST], [" -Werror=unguarded-availability-new"])],
2610+
[],
2611+
[-Werror])
2612+
26062613
LIPO_INTEL64_FLAGS=""
26072614
if test "${enable_universalsdk}"
26082615
then

0 commit comments

Comments
 (0)