-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Boost: Add embed_bitcode option #13970
Boost: Add embed_bitcode option #13970
Conversation
As of Xcode 14, Bitcode is deprecated and no longer accepted for AppStore submissions. This commit adds an `embed_bitcode` option with a default value of `True` to match the current behavior. When the compiler version is 14.0+ the option is deleted and the `-fembed-bitcode` flag is not added to the cxx_flags.
I detected other pull requests that are modifying boost/all recipe:
This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prsso don't hesitate to report issues/improvements there. |
I would have expected embed bitcode to not be injected manually by recipe itself, and it's weird to see a dedicated recipe option for a compiler flag. It should come from |
@SpaceIm I would agree, but it would appear that the recipe is ignoring Although I suppose I could make it check that configuration for this particular flag? |
boost is still written in conan v1 style, maybe it listens CC, CXX and LD env vars instead. But yes a good migration of this recipe to conan v2 would ensure that the new config tools.build.cflags etc are propagated to the build |
Looks like it does look at the CXXFLAGS in It would be great if the Boost recipe were migrated to v2, but that's really outside of the scope of time I actually have to dedicate to this right now. I've already got a list of around 15 recipes we use internally that I have to update! |
Conan v1 pipelineAll green in build 2 (
|
Hooks produced the following warnings for commit 6e92162boost/1.77.0
boost/1.72.0
boost/1.71.0
boost/1.75.0
boost/1.74.0
boost/1.73.0
boost/1.70.0
boost/1.79.0
boost/1.78.0
boost/1.76.0
boost/1.80.0
|
@@ -1109,7 +1116,8 @@ def add_defines(library): | |||
if self.options.multithreading: | |||
cxx_flags.append("-DBOOST_SP_USE_SPINLOCK") | |||
|
|||
cxx_flags.append("-fembed-bitcode") | |||
if "embed_bitcode" in self.options and self.options.embed_bitcode: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be simplified by:
if "embed_bitcode" in self.options and self.options.embed_bitcode: | |
if self.options.get_safe("embed_bitcode"): |
?
I don't understand why it's accepted... we should not add this kind of specific recipe option doing babysitting of cflags or cxxflags (rtti, bitcode, lto etc), but instead ensure that tools.build.cflags, tools.build.cxxflags & tools.build.ldflags config are honored, and that default builds are consistent across all conan-center recipes (rtti by default, no bitcode by default, no lto by default etc) |
@SpaceIm You were right. I thought that, as boost is not already migrated to Conan v2, it didn't belong to this PR to add those configuration flags but I just saw your recently opened PR #14139, and, yes, I agree with that. We can start adding those mechanisms and honor the new variables. Thanks! |
As of Xcode 14, Bitcode is deprecated and no longer accepted for AppStore submissions.
(see: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes under the "Apple Clang Compiler: Deprecations" heading.)
This commit adds an
embed_bitcode
option with a default value ofTrue
to match the current behavior.When the compiler version is 14.0+ the option is deleted and the
-fembed-bitcode
flag is not added to the cxx_flags.Specify library name and version: lib/1.0
This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!