Skip to content

Commit 39eafe1

Browse files
committed
chore: enable dead code removal
1 parent 7cd04f3 commit 39eafe1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ AC_ARG_WITH(static-deps,
6666
[skip building a shared library and link test binaries statically]))
6767
AM_CONDITIONAL(WITH_STATIC_DEPS, test "x$with_static_deps" = "xyes")
6868

69+
# Add flags for dead code elimination
70+
AX_CHECK_COMPILE_FLAG([-fdata-sections],
71+
[AM_CFLAGS="$AM_CFLAGS -fdata-sections"])
72+
AX_CHECK_COMPILE_FLAG([-ffunction-sections],
73+
[AM_CFLAGS="$AM_CFLAGS -ffunction-sections"])
74+
6975
# Whether to enable code coverage.
7076
AX_CODE_COVERAGE
7177

0 commit comments

Comments
 (0)