Commits

ecsv committed 48b7cd1

Revert "Enable link time garbage collection when link time optimization is enabled"

Some linker on different platforms don't handle the garbage collection
correctly and create extreme bloated binaries. Therefore, leave it to the user
to enable this feature or not.

Comments (0)

Files changed (1)

projects/unix/Makefile

 
 CXXFLAGS += $(CFLAGS)
 ifeq ($(LTO), 1)
-  CFLAGS += -flto -ffunction-sections -fdata-sections
-  CXXFLAGS += -flto -ffunction-sections -fdata-sections
-  LDFLAGS += -fuse-linker-plugin -Wl,--gc-sections $(CXXFLAGS)
+  CFLAGS += -flto
+  CXXFLAGS += -flto
+  LDFLAGS += -fuse-linker-plugin $(CXXFLAGS)
 endif
 
 # standard build rules