Improve bitcode support in VLC
This merge request improves the support of bitcode in dynamic builds of libvlc.
In particular, the current bitcode support works through CFLAGS-like variable only, because it's currently only used as a static build. When building dynamically, -fembed-bitcode wasn't given to the linker.
By enabling -fembed-bitcode at the linker stage, multiple issues arise:
- libtool eats the
-fembed-bitcodeflag because it doesn't know about it. - bitcode and “advanced“ functions from the linker are not compatible (
undefined,-U,-read_only_relocsin particular). - bitcode and mach-o bundles are not compatibles (
-bundleis triggered by default by-modulewith libtool, since old runtime linkers were not able to dlopen/dlclose a dylib, but it's not the case anymore for a long time). - because
-Wl,-Ucannot be used, we cannot provide weak undefined symbols at all, so it's not possible to make the static module bank work.
This MR address those issues and disable the static module bank in that case.
Edited by Alexandre Janniaux