Skip to content

Commit

Permalink
(#15336) openssl: add embed-bitcode if tools.apple:enable_bitcode is set
Browse files Browse the repository at this point in the history
* openssl: add embed-bitcode if tools.apple:enable_bitcode is set

* openssl: add embed-bitcode to watchOS

* openssl: do not override CFLAGS, append instead

* openssl: set bitcode in templates instead of env vars

---------

Co-authored-by: Chris Mc <[email protected]>
  • Loading branch information
kletoz and Chris Mc authored Mar 21, 2023
1 parent 5a5ef5c commit c852cf6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/openssl/1.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,10 @@ def _create_targets(self):
if self.options.get_safe("fPIC", True):
shared_cflag='shared_cflag => "-fPIC",'

if self.settings.os in ["iOS", "tvOS", "watchOS"] and self.conf.get("tools.apple:enable_bitcode", check_type=bool):
cflags.append("-fembed-bitcode")
cxxflags.append("-fembed-bitcode")

config = config_template.format(targets=targets,
target=self._target,
ancestor=ancestor,
Expand Down
4 changes: 4 additions & 0 deletions recipes/openssl/3.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ def _create_targets(self):
if self.options.get_safe("fPIC", True):
shared_cflag = 'shared_cflag => "-fPIC",'

if self.settings.os in ["iOS", "tvOS", "watchOS"] and self.conf.get("tools.apple:enable_bitcode", check_type=bool):
cflags.append("-fembed-bitcode")
cxxflags.append("-fembed-bitcode")

config = config_template.format(
targets=targets,
target=self._target,
Expand Down

0 comments on commit c852cf6

Please sign in to comment.