Skip to content

Commit 33a2fd9

Browse files
boost: fix output shared library extension on iOS/tvOS/watchOS
must be .dylib instead of .so
1 parent 03246e9 commit 33a2fd9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

recipes/boost/all/conanfile.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ def _python_executable(self):
253253
def _is_windows_platform(self):
254254
return self.settings.os in ["Windows", "WindowsStore", "WindowsCE"]
255255

256+
@property
257+
def _is_apple_embedded_platform(self):
258+
return self.settings.os in ["iOS", "watchOS", "tvOS"]
259+
256260
def config_options(self):
257261
if self.settings.os == "Windows":
258262
del self.options.fPIC
@@ -359,7 +363,7 @@ def _shared(self):
359363

360364
@property
361365
def _stacktrace_addr2line_available(self):
362-
if (self.settings.os in ["iOS", "watchOS", "tvOS"] or self.settings.get_safe("os.subsystem") == "catalyst"):
366+
if (self._is_apple_embedded_platform or self.settings.get_safe("os.subsystem") == "catalyst"):
363367
# sandboxed environment - cannot launch external processes (like addr2line), system() function is forbidden
364368
return False
365369
return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows"
@@ -969,7 +973,7 @@ def _build_flags(self):
969973
flags.append("numa=on")
970974

971975
# https://www.boost.org/doc/libs/1_70_0/libs/context/doc/html/context/architectures.html
972-
if self._b2_os:
976+
if not self._is_apple_embedded_platform and self._b2_os:
973977
flags.append(f"target-os={self._b2_os}")
974978
if self._b2_architecture:
975979
flags.append(f"architecture={self._b2_architecture}")
@@ -1277,6 +1281,9 @@ def create_library_config(deps_name, name):
12771281
if asflags.strip():
12781282
contents += f'<asmflags>"{asflags.strip()}" '
12791283

1284+
if self._is_apple_embedded_platform:
1285+
contents += f'<target-os>"{self._b2_os}" '
1286+
12801287
contents += " ;"
12811288

12821289
self.output.warn(contents)

0 commit comments

Comments
 (0)