Skip to content

Commit f3e6c73

Browse files
Stop compiling js ext sources on non-wasm platforms
Even though we early return in the extconf.rb file, the default Makefile generator will still glob for *.c files in the ext directory and try to compile them. This is unnecessary and can cause build failures on non-wasm platforms.
1 parent dc9921a commit f3e6c73

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/gems/js/ext/js/extconf.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
MakeMakefile::RbConfig ||= RbConfig
44
unless MakeMakefile::RbConfig::CONFIG["platform"] =~ /wasm/
55
$stderr.puts "This extension is only for WebAssembly. Creating a dummy Makefile."
6+
# Explicitly set $srcs to avoid the default '*.c' globbing.
7+
$srcs = []
68
create_makefile("js")
79
return
810
end

0 commit comments

Comments
 (0)