There was an error while loading. Please reload this page.
unguarded-availability-new
1 parent 2a66dd3 commit 689e20aCopy full SHA for 689e20a
3 files changed
Misc/NEWS.d/next/Build/2024-12-21-09-56-37.gh-issue-100384.Ib-XrN.rst
@@ -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
configure.ac
@@ -2603,6 +2603,13 @@ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
2603
esac
2604
AC_MSG_RESULT([$CC])
2605
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
+
2613
LIPO_INTEL64_FLAGS=""
2614
if test "${enable_universalsdk}"
2615
then
0 commit comments