Closed
Description
When compiling the 1DS SDK with AppleClang (so compiling and linking the static lib directly in Xcode via the provided CMakeLists.txt
), AppleClang throws these errors if the -fembed-bitcode
and -fembed-bitcode-marker
are passed to CMake as CFLAGS as well.
clang: error: -ffunction-sections is not supported with -fembed-bitcode
clang: error: -fdata-sections is not supported with -fembed-bitcode
Apple requires modern iOS apps to build with bitcode enabled, and the inclusion of the -ffunction-sections
and -fdata-sections
CFLAGS breaks this requirement. Additionally, on Darwin targets, these flags actually have no effect.
rust-lang/cc-rs#291 and rust-lang/cc-rs#294 both contain some additional information on this issue.