Tweak static build process to improve build speed and debuggability. (#12708)
- Switch from `-O3` to `-O2` for optimization CFLAGS, bringing us in-line with all of our other builds. This should help avoid strange edge cases specific to static builds resulting from the build process. - Stop stripping binaries in static builds so that we can get proper symbolic backtraces when the agent crashes in the static builds.
Austin S. Hemmelgarn committed
Apr 28, 2022 at 07:17 UTC
2946bd8c00bdf58f3af88530c5e47c0f8e8b248c
1 file changed
+1
-7
packaging/makeself/jobs/70-netdata-git.install.sh
+1
-7
@@ -7,7 +7,7 @@
7
cd "${NETDATA_SOURCE_PATH}" || exit 1
8
9
if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
10
- export CFLAGS="-static -O3 -I/openssl-static/include"
10
+ export CFLAGS="-static -O2 -I/openssl-static/include"
11
else
12
export CFLAGS="-static -O1 -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -D_FORTIFY_SOURCE=2 -DNETDATA_INTERNAL_CHECKS=1 -I/openssl-static/include"
13
fi
@@ -54,11 +54,5 @@ if run readelf -l "${NETDATA_INSTALL_PATH}"/bin/netdata | grep 'INTERP'; then
54
exit 1
55
fi
56
57
-if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then
58
- run strip "${NETDATA_INSTALL_PATH}"/bin/netdata
59
- run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/apps.plugin
60
- run strip "${NETDATA_INSTALL_PATH}"/usr/libexec/netdata/plugins.d/cgroup-network
61
-fi
62
-
57
# shellcheck disable=SC2015
58
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true