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).
This commit is contained in:
Andrea Brancaleoni 2020-04-08 17:29:14 +02:00 committed by GitHub
parent 54f8c4e6a3
commit 5b8abe953f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()