From 5b8abe953f7295a946258e66ec1a5fd6df8f2632 Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 8 Apr 2020 17:29:14 +0200 Subject: [PATCH] build: strip local/dbg symbols, from Linux binaries (#22968) Non full stripping seems to be the cause of limited non-determinism. Employ similar default as macOS when stripping away symbols. --disacard-all Remove all local symbols (saving only global symbols). --strip-debug Remove the debugging symbol table entries (those created by the -g option to cc(1) and other compilers). --- script/strip-binaries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/strip-binaries.py b/script/strip-binaries.py index ee60463ee5da..1ed9d0b0e9e8 100755 --- a/script/strip-binaries.py +++ b/script/strip-binaries.py @@ -22,7 +22,7 @@ def strip_binary(binary_path, target_cpu): strip = 'mips64el-redhat-linux-strip' else: strip = 'strip' - execute([strip, '--preserve-dates', binary_path]) + execute([strip, '--discard-all', '--strip-debug', '--preserve-dates', binary_path]) def main(): args = parse_args()