Skip to content
Snippets Groups Projects
Commit e4b58707 authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Hugo Beauzée-Luyssen
Browse files

contrib: add support for bitcode

parent 599191d3
No related branches found
No related tags found
1 merge request!1741contrib: add support for bitcode
Pipeline #210765 passed with stage
in 34 minutes and 30 seconds
......@@ -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"
......
......@@ -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
......
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