diff --git a/boost-context-features.jam b/boost-context-features.jam index d0167fa5..b85bb11d 100644 --- a/boost-context-features.jam +++ b/boost-context-features.jam @@ -5,6 +5,7 @@ import feature ; import os ; +import property ; feature.feature segmented-stacks : on : optional propagated composite ; feature.compose on : BOOST_USE_SEGMENTED_STACKS ; @@ -15,14 +16,30 @@ feature.compose tsx : BOOST_USE_TSX ; feature.feature valgrind : on : optional propagated composite ; feature.compose on : BOOST_USE_VALGRIND ; -local rule default_binary_format ( ) +rule default_binary_format ( properties * ) { local tmp = elf ; - if [ os.name ] = "NT" { tmp = pe ; } - else if [ os.name ] = "CYGWIN" { tmp = pe ; } - else if [ os.name ] = "AIX" { tmp = xcoff ; } - else if [ os.name ] = "MACOSX" { tmp = mach-o ; } - return $(tmp) ; + local target-os = [ property.select : $(properties) ] ; + + if $(target-os) + { + if windows in $(properties) { tmp = pe ; } + else if cygwin in $(properties) { tmp = pe ; } + else if aix in $(properties) { tmp = xcoff ; } + else if darwin in $(properties) { tmp = mach-o ; } + else if iphone in $(properties) { tmp = mach-o ; } + else if appletv in $(properties) { tmp = mach-o ; } + else if watchos in $(properties) { tmp = mach-o ; } + # else: android, linux, freebsd, solaris, qnx, vxworks, ... -> elf + } + else + { + if [ os.name ] = "NT" { tmp = pe ; } + else if [ os.name ] = "CYGWIN" { tmp = pe ; } + else if [ os.name ] = "AIX" { tmp = xcoff ; } + else if [ os.name ] = "MACOSX" { tmp = mach-o ; } + } + return $(tmp) ; } feature.feature binary-format @@ -32,7 +49,7 @@ feature.feature binary-format xcoff : propagated ; -feature.set-default binary-format : [ default_binary_format ] ; +feature.set-default binary-format : elf ; local rule default_abi ( ) { diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 1ba8a52b..3315cb0d 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -14,10 +14,12 @@ import modules ; import os ; import toolset ; import config : requires ; +import boost-context-features ; project : common-requirements $(boost_dependencies) : requirements + @boost-context-features.default_binary_format windows,arm,64:winfib windows:_WIN32_WINNT=0x0601 linux,gcc,on:-fsplit-stack