55
66import feature ;
77import os ;
8+ import property ;
89
910feature.feature segmented-stacks : on : optional propagated composite ;
1011feature.compose <segmented-stacks>on : <define>BOOST_USE_SEGMENTED_STACKS ;
@@ -34,20 +35,35 @@ feature.feature binary-format
3435 ;
3536feature.set-default binary-format : [ default_binary_format ] ;
3637
37- local rule default_abi ( )
38+ rule default_abi ( properties * )
3839{
3940 local tmp = sysv ;
41+ local arch = [ property.select <architecture> : $(properties) ] ;
4042
41- # Avoid using "in" operator here: it returns true if its left
42- # part is empty, which happens e.g. with os.platform on
43- # some uncommon architectures.
44- if [ os.name ] = "NT" { tmp = ms ; }
43+ if <target-os>windows in $(properties) { tmp = ms ; }
44+ else if <target-os>cygwin in $(properties) { tmp = ms ; }
45+ else if [ os.name ] = "NT" { tmp = ms ; }
4546 else if [ os.name ] = "CYGWIN" { tmp = ms ; }
46- else if [ os.platform ] = "ARM" { tmp = aapcs ; }
47- else if [ os.platform ] = "ARM64" { tmp = aapcs ; }
48- else if [ os.platform ] = "MIPS32" { tmp = o32 ; }
49- else if [ os.platform ] = "MIPS64" { tmp = n64 ; }
50- return $(tmp) ;
47+ else if $(arch)
48+ {
49+ if <architecture>arm in $(properties) { tmp = aapcs ; }
50+ else if <architecture>mips in $(properties)
51+ {
52+ if <address-model>64 in $(properties) { tmp = n64 ; }
53+ else { tmp = o32 ; }
54+ }
55+ }
56+ else
57+ {
58+ # Avoid using "in" operator here: it returns true if its left
59+ # part is empty, which happens e.g. with os.platform on
60+ # some uncommon architectures.
61+ if [ os.platform ] = "ARM" { tmp = aapcs ; }
62+ else if [ os.platform ] = "ARM64" { tmp = aapcs ; }
63+ else if [ os.platform ] = "MIPS32" { tmp = o32 ; }
64+ else if [ os.platform ] = "MIPS64" { tmp = n64 ; }
65+ }
66+ return <abi>$(tmp) ;
5167}
5268
5369feature.feature abi
@@ -62,7 +78,7 @@ feature.feature abi
6278 x32
6379 : propagated
6480 ;
65- feature.set-default abi : [ default_abi ] ;
81+ feature.set-default abi : sysv ;
6682
6783feature.feature context-impl
6884 : fcontext
0 commit comments