From aa64ab44cf524948ef5d6ab5f52086fa5b412ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Rosick=C3=BD?= Date: Tue, 15 Jun 2021 22:41:32 +0200 Subject: [PATCH 1/2] use static --- ext/extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/extconf.rb b/ext/extconf.rb index 6d925dab..70994685 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -16,7 +16,7 @@ # Set to true when building binary gems if enable_config('static-stdlib', false) - $LDFLAGS << ' -static-libgcc -static-libstdc++' + $LDFLAGS << ' -static' end if enable_config('march-tune-native', false) From 24bd525e01df3fcd51b4224295a981bbf7ce84a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Rosick=C3=BD?= Date: Wed, 16 Jun 2021 20:48:13 +0200 Subject: [PATCH 2/2] force static on jruby & windows --- ext/extconf.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/extconf.rb b/ext/extconf.rb index 70994685..3e5830d5 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -14,8 +14,12 @@ $CXXFLAGS << ' -std=c++11' +# devkit tools aren't usually available on Windows +# use a static build so we won't need a compiler available at runtime +# see: https://github.com/sass/sassc-ruby/issues/182 +enable_static_by_default = RUBY_ENGINE == "jruby" && (RbConfig::CONFIG['host_os'] =~ /mswin|windows|mingw/i) # Set to true when building binary gems -if enable_config('static-stdlib', false) +if enable_config('static-stdlib', enable_static_by_default) $LDFLAGS << ' -static' end