mirror of
https://github.com/boostorg/context.git
synced 2026-01-19 04:02:17 +00:00
Fix ABI detection for empty 'os.platform'
`in` operator in bjam always returns true if its first argument has no elements[1]. This means that if `os.platform` is empty (not detected), the construction introduced in commitd039c8e4dasets ABI to `aapcs` on all platforms where `os.platform` is empty, including, e.g. riscv64, and breaks build there. This commit refactors the condition to use '=' operator, to make sure that when `os.platform` is empty we get the default ABI value, and thus fixes build on riscv64. [1] https://www.boost.org/doc/libs/1_83_0/tools/build/doc/html/index.html#jam.language.flow_of_control Fixes:d039c8e4da
This commit is contained in:
@@ -79,7 +79,8 @@ local rule default_abi ( )
|
||||
local tmp = sysv ;
|
||||
if [ os.name ] = "NT" { tmp = ms ; }
|
||||
else if [ os.name ] = "CYGWIN" { tmp = ms ; }
|
||||
else if [ os.platform ] in ARM ARM64 { tmp = aapcs ; }
|
||||
else if [ os.platform ] = "ARM" { tmp = aapcs ; }
|
||||
else if [ os.platform ] = "ARM64" { tmp = aapcs ; }
|
||||
else if [ os.platform ] = "MIPS32" { tmp = o32 ; }
|
||||
else if [ os.platform ] = "MIPS64" { tmp = n64 ; }
|
||||
return $(tmp) ;
|
||||
|
||||
Reference in New Issue
Block a user