From 23f3d4b268689153f76429108389500de3722051 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Wed, 1 May 2024 21:11:28 +0000 Subject: [PATCH] Skip building the native extension except for wasm platforms --- packages/gems/js/ext/js/extconf.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/gems/js/ext/js/extconf.rb b/packages/gems/js/ext/js/extconf.rb index 64bd3e42fe..f9e9f822e6 100644 --- a/packages/gems/js/ext/js/extconf.rb +++ b/packages/gems/js/ext/js/extconf.rb @@ -1,4 +1,12 @@ require "mkmf" + +MakeMakefile::RbConfig ||= RbConfig +unless MakeMakefile::RbConfig::CONFIG["platform"] =~ /wasm/ + $stderr.puts "This extension is only for WebAssembly. Creating a dummy Makefile." + create_makefile("js") + return +end + $objs = %w[js-core.o witapi-core.o] use_component_model = enable_config("component-model", false)