unused code removal during linkage
This commit is contained in:
parent
f4e666640e
commit
ededa875d6
2
cbuild
2
cbuild
@ -1 +1 @@
|
|||||||
Subproject commit e8e42424d329ef1e75fb827ddf85d55b4cd89169
|
Subproject commit 991ee072b3b0e4507c80dfac873c7d41d06f0b69
|
||||||
@ -46,7 +46,9 @@ case "$TASK" in
|
|||||||
# -fuse-linker-plugin is required to use static libs with lto
|
# -fuse-linker-plugin is required to use static libs with lto
|
||||||
# -fprofile-use enables compiler to use profiling info files to optimize executable
|
# -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
|
# -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"
|
CPP_ARGS="$C_ARGS"
|
||||||
LINKER_ARGS="$CPP_ARGS"
|
LINKER_ARGS="$CPP_ARGS"
|
||||||
PRE_TASK_SCRIPT=
|
PRE_TASK_SCRIPT=
|
||||||
@ -82,7 +84,7 @@ case "$TASK" in
|
|||||||
;;
|
;;
|
||||||
# creates static library
|
# creates static library
|
||||||
build_static_lib)
|
build_static_lib)
|
||||||
C_ARGS="-O2 -fpic"
|
C_ARGS="-O2 -fpic -fdata-sections -ffunction-sections"
|
||||||
CPP_ARGS="$C_ARGS"
|
CPP_ARGS="$C_ARGS"
|
||||||
PRE_TASK_SCRIPT=
|
PRE_TASK_SCRIPT=
|
||||||
TASK_SCRIPT=cbuild/default_tasks/build_static_lib.sh
|
TASK_SCRIPT=cbuild/default_tasks/build_static_lib.sh
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user