diff mbox series

[committed] libphobos: Don't add zlib when ENABLE_LIBDRUNTIME_ONLY

Message ID 20210901130256.975836-1-ibuclaw@gdcproject.org
State New
Headers show
Series [committed] libphobos: Don't add zlib when ENABLE_LIBDRUNTIME_ONLY | expand

Commit Message

Iain Buclaw Sept. 1, 2021, 1:02 p.m. UTC
Hi,

The D run-time library does not depend on zlib, so only include it in
the library when Phobos is being built as well.

Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and
committed to mainline.

Regards,
Iain.

---
libphobos/ChangeLog:

	* src/Makefile.am: Don't add zlib when ENABLE_LIBDRUNTIME_ONLY.
	* src/Makefile.in: Regenerate.
---
 libphobos/src/Makefile.am | 4 ++++
 libphobos/src/Makefile.in | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am
index f97ddccaca8..9f6251009f6 100644
--- a/libphobos/src/Makefile.am
+++ b/libphobos/src/Makefile.am
@@ -45,8 +45,12 @@  libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES)
 libgphobos_la_LIBTOOLFLAGS =
 libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \
     -version-info $(libtool_VERSION)
+if ENABLE_LIBDRUNTIME_ONLY
+libgphobos_la_LIBADD = ../libdruntime/libgdruntime_convenience.la
+else
 libgphobos_la_LIBADD = \
     ../libdruntime/libgdruntime_convenience.la $(LIBZ)
+endif
 libgphobos_la_DEPENDENCIES = \
     ../libdruntime/libgdruntime_convenience.la libgphobos.spec
 
diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in
index 4f76e1077d5..f8b76486e6e 100644
--- a/libphobos/src/Makefile.in
+++ b/libphobos/src/Makefile.in
@@ -504,9 +504,10 @@  libgphobos_la_LIBTOOLFLAGS =
 libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \
     -version-info $(libtool_VERSION)
 
-libgphobos_la_LIBADD = \
-    ../libdruntime/libgdruntime_convenience.la $(LIBZ)
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@libgphobos_la_LIBADD = \
+@ENABLE_LIBDRUNTIME_ONLY_FALSE@    ../libdruntime/libgdruntime_convenience.la $(LIBZ)
 
+@ENABLE_LIBDRUNTIME_ONLY_TRUE@libgphobos_la_LIBADD = ../libdruntime/libgdruntime_convenience.la
 libgphobos_la_DEPENDENCIES = \
     ../libdruntime/libgdruntime_convenience.la libgphobos.spec