Skip to content

Commit

Permalink
(conan-io#15336) openssl: add embed-bitcode if tools.apple:enable_bit…
Browse files Browse the repository at this point in the history
…code is set

* 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
2 people authored and 0xFireWolf committed Apr 2, 2023
1 parent 0c724a3 commit 154f00f
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 154f00f

Please sign in to comment.