tests/tools: add --as-needed to linker flags
PATCH 1/1 tests/tools: add --as-needed to linker flags
Add --as-needed to the linker flags to reduce the number of shared library dependencies, since not all the tests and tools use all the libraries required by the helper library (for example, many tests do not use cairo). This helps portability of the binaries and also makes a very small improvement to the execution speed and memory consumption.
Signed-off-by Thomas Wood <[email protected]>
--- tests/Makefile.am | 1 + tools/Makefile.am | 1 + 2 files changed, 2 insertions(+)
tests/Makefile.am +1 -0
@@ -52,6 +52,7 @@ LDADD = ../lib/libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) $(LIBUNWIND_LIBS) LDADD += $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(GLIB_LIBS) -lm AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS) $(GLIB_CFLAGS) +AM_LDFLAGS = -Wl,--as-needed drm_import_export_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) drm_import_export_LDADD = $(LDADD) -lpthread
tools/Makefile.am +1 -0
@@ -9,6 +9,7 @@ endif AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib AM_CFLAGS = $(DEBUG_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS) LDADD = $(top_builddir)/lib/libintel_tools.la $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(LIBUNWIND_LIBS) -lm +AM_LDFLAGS = -Wl,--as-needed # aubdumper
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx