Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ext/mini_racer_extension/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@

$CXXFLAGS += " -Wno-reserved-user-defined-literal" if IS_DARWIN

# LLVM Clang 22+ treats -Wincompatible-pointer-types as an error by default;
# suppress it until the `unsigned long` vs `uint64_t` mismatch in the extension
# is properly fixed.
unless try_compile(<<~'C', '-Wincompatible-pointer-types')
#include <stdint.h>
void f(const uint64_t *p) { (void)p; }
void g(void) { unsigned long a[1]; f(a); }
C
$CFLAGS += " -Wno-incompatible-pointer-types"
end

if IS_DARWIN
$LDFLAGS.insert(0, " -stdlib=libc++ ")
else
Expand Down