Skip to content

Commit db70b14

Browse files
committed
Rely on Ruby's HAVE_BUILTIN___BUILTIN_CLZLL
We don't need to perform out own checks. Fix: #1052
1 parent 9be0e8e commit db70b14

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

ext/json/ext/parser/extconf.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,6 @@
1515
have_func("rb_hash_bulk_insert", "ruby.h") # Missing on TruffleRuby
1616
have_func("ruby_xfree_sized", "ruby.h") # RUBY_VERSION >= 4.1
1717

18-
def have_builtin_func(name, check_expr, opt = "", &b)
19-
checking_for checking_message(name.funcall_style, nil, opt) do
20-
if try_compile(<<SRC, opt, &b)
21-
int foo;
22-
int main() { #{check_expr}; return 0; }
23-
SRC
24-
$defs.push(format("-DHAVE_BUILTIN_%s", name.tr_cpp))
25-
true
26-
else
27-
false
28-
end
29-
end
30-
end
31-
32-
have_builtin_func("__builtin_clzll", "__builtin_clzll(0)")
33-
3418
if have_header("x86intrin.h")
3519
have_func("_lzcnt_u64", "x86intrin.h")
3620
end

0 commit comments

Comments
 (0)