diff --git a/ext/digest/blake3/extconf.rb b/ext/digest/blake3/extconf.rb index df844d0..93e88fa 100644 --- a/ext/digest/blake3/extconf.rb +++ b/ext/digest/blake3/extconf.rb @@ -78,6 +78,15 @@ def blake3_have_isa?(name, flag, snippet) have_header("sys/cdefs.h") +checking_for("C11 atomics") do + unless try_compile(<<~C) + static _Atomic int atomic_int = 0; + int main(void){ return 0 } + C + $defs << "-DBLAKE3_ATOMICS=0" + end +end + $preload = %w[digest] create_makefile("digest/blake3")