macro_name CLANG

binary_name em++

lang_flags "-fwasm-exceptions -std=c++20 -D_REENTRANT"
lang_binary_linker_flags "-s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -fwasm-exceptions"

warning_flags "-Wall -Wextra -Wpedantic -Wshadow -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wshorten-64-to-32"

werror_flags "-Werror -Wno-error=unused-parameter -Wno-error=unreachable-code -Wno-error=unused-lambda-capture"

maintainer_warning_flags "-Wunreachable-code -Wdocumentation -Qunused-arguments"

optimization_flags "-O3"
sanitizer_optimization_flags "-O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer"
size_optimization_flags "-Os"

visibility_build_flags "-fvisibility=hidden"
visibility_attribute '__attribute__((visibility("default")))'

<so_link_commands>
default -> "false"
</so_link_commands>

<isa_flags>
simd128 -> "-msimd128"
</isa_flags>

<binary_link_commands>
default -> "{cxx}"
</binary_link_commands>

<ct_value_barrier>
default -> asm
</ct_value_barrier>
