Skip to content
Snippets Groups Projects
Commit 585c0b02 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Jean-Baptiste Kempf
Browse files

apple: build.sh: add support for -fembed-bitcode-marker

parent 26231ecf
No related branches found
No related tags found
1 merge request!182Improve bitcode support in VLC
Pipeline #138444 failed with stages
in 19 minutes and 9 seconds
......@@ -98,6 +98,7 @@ VLC_REQUESTED_CORE_COUNT=0
VLC_DISABLE_DEBUG=0
# whether to compile with bitcode or not
VLC_USE_BITCODE=0
VLC_BITCODE_FLAG="-fembed-bitcode"
# whether to build static or dynamic plugins
VLC_BUILD_DYNAMIC=0
......@@ -123,7 +124,8 @@ usage()
echo " --arch=ARCH Architecture to build for"
echo " (i386|x86_64|armv7|arm64)"
echo " --sdk=SDK Name of the SDK to build with (see 'xcodebuild -showsdks')"
echo " --enable-bitcode Enable bitcode for compilation"
echo " --enable-bitcode Enable bitcode for compilation, same as with =full"
echo " --enable-bitcode=marker Enable bitcode marker for compilation"
echo " --disable-debug Disable libvlc debug mode (for release)"
echo " --verbose Print verbose output and disable multi-core use"
echo " --help Print this help"
......@@ -318,8 +320,8 @@ set_host_envvars()
local clike_flags="$VLC_DEPLOYMENT_TARGET_CFLAG -arch $VLC_HOST_ARCH -isysroot $VLC_APPLE_SDK_PATH $1"
local bitcode_flag=""
if [ "$VLC_USE_BITCODE" -gt "0" ]; then
clike_flags+=" -fembed-bitcode"
bitcode_flag=" -fembed-bitcode"
clike_flags+=" $VLC_BITCODE_FLAG"
bitcode_flag=" $VLC_BTICODE_FLAG"
fi
export CPPFLAGS="-arch $VLC_HOST_ARCH -isysroot $VLC_APPLE_SDK_PATH"
......@@ -364,6 +366,7 @@ 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
# We use bitcode for contribs in every case, no dylib or executable built from them
clike_flags+=" -fembed-bitcode"
fi
......@@ -453,8 +456,12 @@ do
--disable-debug)
VLC_DISABLE_DEBUG=1
;;
--enable-bitcode)
--enable-bitcode|--enable-bitcode=full)
VLC_USE_BITCODE=1
;;
--enable-bitcode=marker)
VLC_USE_BITCODE=1
VLC_BITCODE_FLAG="-fembed-bitcode-marker"
;;
--arch=*)
VLC_HOST_ARCH="${1#--arch=}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment