From 154f00f580738a2327194e0b45ea56c9a7dea873 Mon Sep 17 00:00:00 2001 From: Kleto Zan Date: Tue, 21 Mar 2023 09:38:14 -0300 Subject: [PATCH] (#15336) openssl: add embed-bitcode if tools.apple:enable_bitcode 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 --- recipes/openssl/1.x.x/conanfile.py | 4 ++++ recipes/openssl/3.x.x/conanfile.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 4a1bb6ee9b0f6..d7807c3f39ee0 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -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, diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index beaea42777422..8b4713da3b746 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -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,