Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions boost-context-features.jam
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,30 @@ feature.compose <htm>tsx : <define>BOOST_USE_TSX ;
feature.feature valgrind : on : optional propagated composite ;
feature.compose <valgrind>on : <define>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 <target-os> : $(properties) ] ;

if $(target-os)
{
if <target-os>windows in $(properties) { tmp = pe ; }
else if <target-os>cygwin in $(properties) { tmp = pe ; }
else if <target-os>aix in $(properties) { tmp = xcoff ; }
else if <target-os>darwin in $(properties) { tmp = mach-o ; }
else if <target-os>iphone in $(properties) { tmp = mach-o ; }
else if <target-os>appletv in $(properties) { tmp = mach-o ; }
else if <target-os>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 <binary-format>$(tmp) ;
}

feature.feature binary-format
Expand All @@ -33,7 +49,7 @@ feature.feature binary-format
xcoff
: propagated
;
feature.set-default binary-format : [ default_binary_format ] ;
feature.set-default binary-format : elf ;

rule default_abi ( properties * )
{
Expand Down
1 change: 1 addition & 0 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ project
: common-requirements <library>$(boost_dependencies)
: requirements
<conditional>@boost-context-features.default_abi
<conditional>@boost-context-features.default_binary_format
<target-os>windows,<architecture>arm,<address-model>64:<context-impl>winfib
<target-os>windows:<define>_WIN32_WINNT=0x0601
<target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack
Expand Down
Loading