automake: ask the linker to do garbage collection
By doing GC the linker removes all the symbols that are not referenced and/or used by the final library. This results in a saving of ~100K up-to ~600K per (stripped) binary (classic vs gallium drivers). If interested one can ask the compiler to print the sections that are removed using -Wl,--print-gc-sections. v2: Check if ld supports the flag before using it. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com> (v1)
This commit is contained in:
@@ -51,6 +51,7 @@ libGLESv2_la_LIBADD = $(GLESv2_LIB_DEPS)
|
||||
libGLESv2_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
-version-number 2 \
|
||||
$(GC_SECTIONS) \
|
||||
-Wl,--no-undefined
|
||||
|
||||
if HAVE_SHARED_GLAPI
|
||||
|
||||
Reference in New Issue
Block a user