Commit f87eeb29 authored by David Fuhrmann's avatar David Fuhrmann

macOS Enable -Werror=partial-availability for contribs

Usually, contribs do not support runtime handling of partial
availability well. Turning this warning into an error has several
- It fixes feature detection for custom build scripts: If a custom
build script includes the correct header, the check will now fail
to build and replacements will be enabled. This is the case for
ffmpeg, for instance.
- Even if configure check might not fail, the build will fail
for correctly annotated functions, once they are used in the code.
This makes it very visible if new partial symbols are added, so
that they can be fixed or disabled subsequently.

refs #18476
parent 98f88252
......@@ -122,8 +122,9 @@ export ac_cv_func_mkostemps=no
export ac_cv_func_ffsll=no
export ac_cv_func_flsll=no
export ac_cv_func_fdopendir=no
export ac_cv_func_openat=no # Disables fstatat as well
export ac_cv_func_openat=no
export ac_cv_func_fstatat=no
export ac_cv_func_readlinkat=no
# libnetwork does not exist yet on 10.7 (used by libcddb)
export ac_cv_lib_network_connect=no
......@@ -148,6 +149,17 @@ let jobs=$core_count+1
# vlc/contribs
# Usually, VLCs contrib libraries do not support partial availability at runtime.
# Forcing those errors has two reasons:
# - Some custom configure scripts include the right header for testing availability.
# Those configure checks fail (correctly) with those errors, and replacements are
# enabled. (e.g. ffmpeg)
# - This will fail the build if a partially available symbol is added later on
# in contribs and not mentioned in the list of symbols above.
export CFLAGS="-Werror=partial-availability"
export CXXFLAGS="-Werror=partial-availability"
export OBJCFLAGS="-Werror=partial-availability"
info "Building contribs"
spushd "${vlcroot}/contrib"
mkdir -p contrib-$TRIPLET && cd contrib-$TRIPLET
......@@ -166,6 +178,10 @@ fi
unset CFLAGS
# vlc/bootstrap
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment