mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
If Scylla is compiled without "-g" (this is, for example, the default in dev build mode), any static library that we link with it and contains any debugging information will cause the resulting executable to incorrectly look (e.g., to file(1) or to gdb) like it has debugging information. For more than three years now (see #10863 for historical context), the wasmtime.a library, which has debugging symbols, has caused this to happen. In this patch, if a certain build is compiled WITHOUT "-g", we add the "--strip-debug" option to the linker to remove the partial debugging information from the executable. Note that --strip-debug is not added in build modes which do use "-g", or if the user explicitly asked to add -g (e.g., "configure.py --cflags=-g"). Before this patch: $ file build/dev/scylla build/dev/scylla: ELF 64-bit LSB executable ... , with debug_info, not stripped Ater this patch: $ file build/dev/scylla build/dev/scylla: ELF 64-bit LSB executable ... , not stripped Fixes #23832. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes scylladb/scylladb#23840