-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release build for mac will enable bitcode #1261
Comments
What errors/warnings are you seeing exactly? Distributing (and thus building for) bitcode is indeed deprecated, and while LTO/IPO in LLVM does similarly emit LLVM bitcode into the object files in order to optimize across them, I see no mention of LTO in AppleClang being deprecated along with it, and frankly I have a hard time seeing that being the case. |
INTERPROCEDURAL_OPTIMIZATION causes the -flto=thin option to the compiler and generates an object file with bitcode output. |
I assume then that you're not generating/building your Xcode project with CMake (and referencing the Jolt CMake target as part of that) but instead manually bundling the statically linked XCFramework? If that's the case, I suppose there is some argument for disabling LTO by default when targeting Apple platforms, since there's the possibility of the static libraries being bundled into an XCFramework bundle. It could also be conditionally disabled only when Frankly I'm not seeing much of a difference at all in |
I'm not really sure what to do with this. The way I read the release notes from Apple is that they remove bitcode from apps uploaded to the store. The reasoning seems to be that the binary format of bitcode changes too often, meaning it cannot be reliable used to recompile the same code for different architectures. Besides they got rid of all other architectures anyway, so they don't need it anymore. The LTO flags haven't been removed, and can still be useful when you want to get more optimized code in case you link the static library into your code. In the case of an xcframework, they're probably not desired as they potentially break with every new clang release. Since it is really easy to turn LTO off for an xcframework (set the project setting ``INTERPROCEDURAL_OPTIMIZATION` to off) and FetchContent compiles and links the static library every build, the breaking format changes are not an issue. So I'm tempted to leave things as they are (possibly adding some extra information to the build docs on what to do if you receive the error). |
In Release/Distribution builds for macOS/iOS/visionOS,
INTERPROCEDURAL_OPTIMIZATION
is ON so bitcode is enabled.I would like to see bitcode disabled by default as it has been deprecated since Xcode14.
Also, there are cases where bitcode is required for older models, so I think it would be better to be able to enable it as an option.
Probably related to the following issue and pull req.
#418
#357
The text was updated successfully, but these errors were encountered: