Skip to content

Commit

Permalink
Make the releases compatible with JRuby & co
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Feb 3, 2021
1 parent 51680a5 commit a1cbcfc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
33 changes: 19 additions & 14 deletions ext/bootsnap/extconf.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion lib/bootsnap/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module Bootsnap
VERSION = "1.7.0"
VERSION = "1.7.1.pre1"
end

0 comments on commit a1cbcfc

Please sign in to comment.