[vlc-devel] [PATCH v2 14/17] contrib: vpx: allow compiling without bitcode
Alexandre Janniaux
ajanni at videolabs.io
Thu Apr 30 10:09:30 CEST 2020
Hi,
Indeed we pass the bitcode flags through CFLAGS when enabled with
--enable-bitcode in the apple script, so bitcode support should
still be enabled:
# extras/package/apple/build.sh
write_config_mak()
{
# Flags to be used for C-like compilers (C, C++, Obj-C)
local clike_flags="$VLC_DEPLOYMENT_TARGET_CFLAG -arch $VLC_HOST_ARCH -isysroot $VLC_APPLE_SDK_PATH $1"
if [ "$VLC_USE_BITCODE" -gt "0" ]; then
clike_flags+=" -fembed-bitcode"
fi
...
local vlc_cflags="$clike_flags"
local vlc_cxxflags="$clike_flags"
local vlc_objcflags="$clike_flags"
...
echo "Creating makefile..."
test -e config.mak && unlink config.mak
exec 3>config.mak || return $?
printf '# This file was automatically generated!\n\n' >&3
printf '%s := %s\n' "CPPFLAGS" "${vlc_cppflags}" >&3
printf '%s := %s\n' "CFLAGS" "${vlc_cflags}" >&3
printf '%s := %s\n' "CXXFLAGS" "${vlc_cxxflags}" >&3
printf '%s := %s\n' "OBJCFLAGS" "${vlc_objcflags}" >&3
I'll add a mention to that in the commit message.
Maybe we should add a new CI target to ensure all dependencies
built during iOS builds can have bitcode-enabled? It's more or
less the same as adding a build target to tvOS even if
building for tvOS would not take into account the stream
output pipeline.
Regards,
--
Alexandre Janniaux
Videolabs
On Thu, Apr 30, 2020 at 12:17:45AM +0300, Martin Storsjö wrote:
> On Wed, 29 Apr 2020, Alexandre Janniaux wrote:
>
> > -fembed-bitcode might not be supported and we enable it through the
> > --extra-cflags parameters like every other contribs.
> > ---
> > contrib/src/vpx/libvpx-remove-bitcode.patch | 17 +++++++++++++++++
> > contrib/src/vpx/rules.mak | 1 +
> > 2 files changed, 18 insertions(+)
> > create mode 100644 contrib/src/vpx/libvpx-remove-bitcode.patch
>
> Wouldn't this end up with the proper native builds missing bitcode as well?
> Or do we forcibly add -fembed-bitcode to CFLAGS in those cases, so we can
> live without vpx's buildsystem adding it themselves?
>
> In that case the patch might be fine, but it would be good to clarify better
> (both in rules.mak and in the commit message) why it's ok to remove these
> flags here.
>
> // Martin
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list