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.

  • Participants
  • Parent commits bfe79ce

Comments (0)

Files changed (1)

File projects/unix/Makefile

 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)
 # standard build rules