macro_name SUN_STUDIO

binary_name CC

optimization_flags "-xO2"

shared_flags "-KPIC"
warning_flags "+w -erroff=truncwarn,wnoretvalue,wlessrestrictedthrow"
lang_flags "-std=c++20 +p -features=extensions"

ar_command CC
ar_options "-xar -o"

supports_gcc_inline_asm yes

<so_link_commands>
default -> "{cxx} -G -h{soname_abi}"
</so_link_commands>

<mach_abi_linking>
# Needed on some Linux distros
linux      -> "-library=stlport4"

sparc64    -> "-m64 -xarch=sparc"
x86_64     -> "-m64"
</mach_abi_linking>

<isa_flags>
# Botan needs C++11, and that requires Sun Studio 12.4 or above.
#  Sun Studio 12.4 supports upto -xarch=avx2, but the processor must support it
#  AESNI requires -xarch=aes, and RDRAND requires -xarch=avx_i.
#  https://docs.oracle.com/cd/E37069_01/html/E37074/bjapp.html#OSSCGbkazd
sse2       -> "-xarch=sse2"
ssse3      -> "-xarch=ssse3"
sse41      -> "-xarch=sse4.1"
aesni      -> "-xarch=aes"
rdrand     -> "-xarch=avx_i"
avx2       -> "-xarch=avx2"
</isa_flags>

<ct_value_barrier>
default -> none
</ct_value_barrier>
