Add build-id=none for GCC when build for Release (#21808)

* Add build-id=none to GCC/Clang, unneeded metadata in binaries

* Add build-id=none to GCC/Clang, unneeded metadata in binaries

* Add build-id=none to Clang

* Fix

* Fix

* Add build-id=none to GCC
This commit is contained in:
Juan Carlos
2023-05-08 13:53:32 -03:00
committed by GitHub
parent ec3bca8fab
commit 4ee70165f1
2 changed files with 7 additions and 0 deletions

View File

@@ -454,6 +454,7 @@
static libraries.
- When compiling for Release the flag `-fno-math-errno` is used for GCC.
- When compiling for Release the flag `--build-id=none` is used for GCC Linker.
## Docgen

View File

@@ -364,3 +364,9 @@ tcc.options.always = "-w"
clang.options.linker %= "${clang.options.linker} -s"
clang.cpp.options.linker %= "${clang.cpp.options.linker} -s"
@end
# Linker: Skip "Build-ID metadata strings" in binaries when build for release.
@if release or danger:
gcc.options.linker %= "${gcc.options.linker} -Wl,--build-id=none"
gcc.cpp.options.linker %= "${gcc.cpp.options.linker} -Wl,--build-id=none"
@end