Skip to content
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: rely on tools.apple:enable_bitcode conf instead of a custom option #14139

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ class BoostConan(ConanFile):
"buildid": "ANY",
"python_buildid": "ANY",
"system_use_utf8": [True, False],
"embed_bitcode": [True, False], # enables embedding bitcode for iOS
}
options.update({f"without_{_name}": [True, False] for _name in CONFIGURE_OPTIONS})

Expand Down Expand Up @@ -145,7 +144,6 @@ class BoostConan(ConanFile):
"buildid": None,
"python_buildid": None,
"system_use_utf8": False,
"embed_bitcode": True,
}
default_options.update({f"without_{_name}": False for _name in CONFIGURE_OPTIONS})
default_options.update({f"without_{_name}": True for _name in ("graph_parallel", "mpi", "python")})
Expand Down Expand Up @@ -291,11 +289,6 @@ def config_options(self):
self.options.without_json = True
self.options.without_nowide = True

# bitcode is deprecated in Xcode 14, and the AppStore will not accept submissions from Xcode 14 with bitcode enabled
# https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes
if not is_apple_os(self) or Version(self.settings.compiler.version) >= 14.0:
del self.options.embed_bitcode

# iconv is off by default on Windows and Solaris
if self._is_windows_platform or self.settings.os == "SunOS":
self.options.i18n_backend_iconv = "off"
Expand Down Expand Up @@ -1116,7 +1109,7 @@ def add_defines(library):
if self.options.multithreading:
cxx_flags.append("-DBOOST_SP_USE_SPINLOCK")

if "embed_bitcode" in self.options and self.options.embed_bitcode:
if self.conf.get("tools.apple:enable_bitcode", check_type=bool):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that, whenever this recipe will be migrated, we should remove these lines because, with that configuration enabled, CMakeToolchain will automatically add that bitcode flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boost is not built with CMake (yet?), but b2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put money on Boost never switching from b2 to CMake.

cxx_flags.append("-fembed-bitcode")

if self._with_iconv:
Expand Down