From a1cbcfc03ca01f1a6771e5ac6ee58fc54f756def Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 3 Feb 2021 13:03:54 +0100 Subject: [PATCH] Make the releases compatible with JRuby & co --- ext/bootsnap/extconf.rb | 33 +++++++++++++++++++-------------- lib/bootsnap/version.rb | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/ext/bootsnap/extconf.rb b/ext/bootsnap/extconf.rb index 9cdb726f..7cec8b1b 100644 --- a/ext/bootsnap/extconf.rb +++ b/ext/bootsnap/extconf.rb @@ -1,19 +1,24 @@ # frozen_string_literal: true require("mkmf") -$CFLAGS << ' -O3 ' -$CFLAGS << ' -std=c99' -# ruby.h has some -Wpedantic fails in some cases -# (e.g. https://github.com/Shopify/bootsnap/issues/15) -unless ['0', '', nil].include?(ENV['BOOTSNAP_PEDANTIC']) - $CFLAGS << ' -Wall' - $CFLAGS << ' -Werror' - $CFLAGS << ' -Wextra' - $CFLAGS << ' -Wpedantic' +if RUBY_ENGINE == 'ruby' + $CFLAGS << ' -O3 ' + $CFLAGS << ' -std=c99' - $CFLAGS << ' -Wno-unused-parameter' # VALUE self has to be there but we don't care what it is. - $CFLAGS << ' -Wno-keyword-macro' # hiding return - $CFLAGS << ' -Wno-gcc-compat' # ruby.h 2.6.0 on macos 10.14, dunno -end + # ruby.h has some -Wpedantic fails in some cases + # (e.g. https://github.com/Shopify/bootsnap/issues/15) + unless ['0', '', nil].include?(ENV['BOOTSNAP_PEDANTIC']) + $CFLAGS << ' -Wall' + $CFLAGS << ' -Werror' + $CFLAGS << ' -Wextra' + $CFLAGS << ' -Wpedantic' + + $CFLAGS << ' -Wno-unused-parameter' # VALUE self has to be there but we don't care what it is. + $CFLAGS << ' -Wno-keyword-macro' # hiding return + $CFLAGS << ' -Wno-gcc-compat' # ruby.h 2.6.0 on macos 10.14, dunno + end -create_makefile("bootsnap/bootsnap") + create_makefile("bootsnap/bootsnap") +else + File.write("Makefile", dummy_makefile($srcdir).join("")) +end diff --git a/lib/bootsnap/version.rb b/lib/bootsnap/version.rb index 9fff4eb5..bc40c1d7 100644 --- a/lib/bootsnap/version.rb +++ b/lib/bootsnap/version.rb @@ -1,4 +1,4 @@ # frozen_string_literal: true module Bootsnap - VERSION = "1.7.0" + VERSION = "1.7.1.pre1" end