Build Ruby with LTO enabled (#16)

This commit is contained in:
Struma 2023-05-04 20:27:05 -04:00
parent 10cdc672dd
commit 580da08dc3
3 changed files with 12 additions and 3 deletions

View file

@ -333,7 +333,10 @@ $(BUILD_PREFIX)/libruby.so.3.1: $(DOWNLOADS)/ruby/Makefile
$(DOWNLOADS)/ruby/Makefile: $(DOWNLOADS)/ruby/configure
cd $(DOWNLOADS)/ruby; \
$(CONFIGURE) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS)
export $(CONFIGURE_ENV); \
export CFLAGS="-flto=full $$CFLAGS"; \
export LDFLAGS="-flto=full $$LDFLAGS"; \
./configure $(CONFIGURE_ARGS) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS)
$(DOWNLOADS)/ruby/configure: $(DOWNLOADS)/ruby/*.c
cd $(DOWNLOADS)/ruby; autoreconf -i

View file

@ -311,7 +311,10 @@ $(LIBDIR)/libruby.3.1.dylib: $(DOWNLOADS)/ruby/Makefile
$(DOWNLOADS)/ruby/Makefile: $(DOWNLOADS)/ruby/configure
cd $(DOWNLOADS)/ruby; \
$(CONFIGURE) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS)
export $(CONFIGURE_ENV); \
export CFLAGS="-flto=full $$CFLAGS"; \
export LDFLAGS="-flto=full $$LDFLAGS"; \
./configure $(CONFIGURE_ARGS) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS)
$(DOWNLOADS)/ruby/configure: $(DOWNLOADS)/ruby/*.c
cd $(DOWNLOADS)/ruby; autoreconf -i

View file

@ -320,7 +320,10 @@ $(BUILD_PREFIX)/$(RB_PREFIX)-ruby310.dll: $(DOWNLOADS)/ruby/Makefile
$(DOWNLOADS)/ruby/Makefile: $(DOWNLOADS)/ruby/configure
cd $(DOWNLOADS)/ruby; \
$(CONFIGURE) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS)
export $(CONFIGURE_ENV); \
export CFLAGS="-flto $$CFLAGS"; \
export LDFLAGS="-flto $$LDFLAGS"; \
./configure $(CONFIGURE_ARGS) $(RUBY_CONFIGURE_ARGS) $(RUBY_FLAGS)
$(DOWNLOADS)/ruby/configure: $(DOWNLOADS)/ruby/*.c
cd $(DOWNLOADS)/ruby; autoreconf -i