[vlc-commits] [Git][videolan/vlc][master] contrib: add support for bitcode

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Apr 14 09:51:36 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
e4b58707 by Felix Paul Kühne at 2022-04-14T08:40:40+00:00
contrib: add support for bitcode

- - - - -


2 changed files:

- contrib/bootstrap
- contrib/src/main.mak


Changes:

=====================================
contrib/bootstrap
=====================================
@@ -36,6 +36,7 @@ usage()
 	echo "                   (USE AT YOUR OWN LEGAL RISKS)"
 	echo "  --disable-optim  disable optimization in libraries"
 	echo "  --enable-pdb     generate debug information in PDB format"
+	echo "  --enable-bitcode generate bitcode information"
 }
 
 BUILD=
@@ -51,6 +52,7 @@ GNUV3="1"
 AD_CLAUSES=
 WITH_OPTIMIZATION="1"
 ENABLE_PDB=
+ENABLE_BITCODE=
 
 while test -n "$1"
 do
@@ -83,6 +85,9 @@ do
 		--enable-pdb)
 			ENABLE_PDB=1
 			;;
+		--enable-bitcode)
+			ENABLE_BITCODE=1
+			;;
 		--enable-small)
 			ENABLE_SMALL=1
 			;;
@@ -306,6 +311,10 @@ case "${OS}" in
 		then
 			add_make_enabled "HAVE_TVOS"
 		fi
+		if test "$ENABLE_BITCODE"
+		then
+			add_make_enabled "HAVE_BITCODE_ENABLED"
+		fi
 		;;
 	*bsd*)
 		add_make_enabled "HAVE_BSD"


=====================================
contrib/src/main.mak
=====================================
@@ -350,6 +350,11 @@ CFLAGS := $(CFLAGS) -g -O2
 CXXFLAGS := $(CXXFLAGS) -g -O2
 endif
 
+ifdef HAVE_BITCODE_ENABLED
+CFLAGS := $(CFLAGS) -fembed-bitcode
+CXXFLAGS := $(CXXFLAGS) -fembed-bitcode
+endif
+
 HOSTVARS := $(HOSTTOOLS) \
 	CPPFLAGS="$(CPPFLAGS)" \
 	CFLAGS="$(CFLAGS)" \
@@ -463,6 +468,9 @@ MESONFLAGS += --buildtype debug
 else
 MESONFLAGS += --buildtype debugoptimized
 endif
+ifdef HAVE_BITCODE_ENABLED
+MESONFLAGS += -Db_bitcode=true
+endif
 
 ifdef HAVE_CROSS_COMPILE
 # When cross-compiling meson uses the env vars like



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e4b58707be272b76abc7aff51f673fd017a4e083

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e4b58707be272b76abc7aff51f673fd017a4e083
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list