Building my Xcode project gives the following warning:
/ld:-1: -headerpad_max_install_names is ignored when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
How to act upon this warning?
Presumably Xcode is throwing this headerpad_max_install_names
entity to the linker which is complaining.
But I can't see WHERE. grep
ping through my project does not find this token.
I would like to achieve (and maintain) zero warnings.
EDIT: I found in myproject/External/cmake-modules/ios.toolchain.cmake:
if (ENABLE_BITCODE)
set(BITCODE "-fembed-bitcode")
set(HEADER_PAD "")
message(STATUS "Enabling bitcode support.")
else()
set(BITCODE "")
set(HEADER_PAD "-headerpad_max_install_names")
message(STATUS "Disabling bitcode support.")
endif()
-headerpad_max_install_names
is a linker argument, which, depending on the project you're working on, might be something you can disable. Here's someone with a description of how to change it in XCode.
According to the LLVM change that introduced it, headerpad_max_install_names
pads the header by enough bytes so that the dylib ID and loaded dylib paths can all be extended to MAXPATHLEN.
This can be needed in a later build step on many projects, allowing dylib paths to be rewritten. If you don't need to do any install name changing (I gather it increases portability of binaries), you can probably turn it off.