@@ -253,6 +253,10 @@ def _python_executable(self):
253
253
def _is_windows_platform (self ):
254
254
return self .settings .os in ["Windows" , "WindowsStore" , "WindowsCE" ]
255
255
256
+ @property
257
+ def _is_apple_embedded_platform (self ):
258
+ return self .settings .os in ["iOS" , "watchOS" , "tvOS" ]
259
+
256
260
def config_options (self ):
257
261
if self .settings .os == "Windows" :
258
262
del self .options .fPIC
@@ -359,7 +363,7 @@ def _shared(self):
359
363
360
364
@property
361
365
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" ):
363
367
# sandboxed environment - cannot launch external processes (like addr2line), system() function is forbidden
364
368
return False
365
369
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):
969
973
flags .append ("numa=on" )
970
974
971
975
# 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 :
973
977
flags .append (f"target-os={ self ._b2_os } " )
974
978
if self ._b2_architecture :
975
979
flags .append (f"architecture={ self ._b2_architecture } " )
@@ -1277,6 +1281,9 @@ def create_library_config(deps_name, name):
1277
1281
if asflags .strip ():
1278
1282
contents += f'<asmflags>"{ asflags .strip ()} " '
1279
1283
1284
+ if self ._is_apple_embedded_platform :
1285
+ contents += f'<target-os>"{ self ._b2_os } " '
1286
+
1280
1287
contents += " ;"
1281
1288
1282
1289
self .output .warn (contents )
0 commit comments