From 888b1e05e77039c5b7aa0ce96172c0d61424a236 Mon Sep 17 00:00:00 2001 From: Timerix22 Date: Fri, 19 May 2023 19:30:44 +0600 Subject: [PATCH] build_exec dead code removal --- default.config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/default.config b/default.config index db6ac8d..ca850d5 100644 --- a/default.config +++ b/default.config @@ -49,7 +49,9 @@ case "$TASK" in # -fuse-linker-plugin is required to use static libs with lto # -fprofile-use enables compiler to use profiling info files to optimize executable # -fprofile-prefix-path sets path where profiling info about objects are be saved - C_ARGS="-O2 -flto=auto -fuse-linker-plugin -fprofile-use -fprofile-prefix-path=$(realpath $OBJDIR)/objects" + # -fdata-sections -ffunction-sections -Wl,--gc-sections removes unused code + C_ARGS="-O2 -flto=auto -fuse-linker-plugin -fprofile-use -fprofile-prefix-path=$(realpath $OBJDIR)/objects \ +-fdata-sections -ffunction-sections -Wl,--gc-sections" CPP_ARGS="$C_ARGS" LINKER_ARGS="$CPP_ARGS" PRE_TASK_SCRIPT=