Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5421469

Browse files
committed
Remove libffi build dir after install
Previously if you installed the gem with `--disable-system-libffi`, the gem would leave around the compiled libraries for ffi when it no longer needed them. This commits hooks into the Makefile install and removes the build directory after the gem has successfully installed. On my system, this appears to reduce the install usage for libffi 1.17.2 from 8.5 MB to 7.3 MB.
1 parent 5b44581 commit 5421469

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/ffi_c/libffi.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ $(LIBFFI):
1616
sh $(LIBFFI_CONFIGURE) $(LIBFFI_HOST) > /dev/null; \
1717
fi
1818
$(MAKE) -C "$(LIBFFI_BUILD_DIR)"
19+
20+
install: install-cleanup
21+
22+
install-cleanup: $(DLLIB)
23+
rm -rf "$(LIBFFI_BUILD_DIR)"

0 commit comments

Comments
 (0)