Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d24a98c

Browse files
committedAug 6, 2024
Add support stripping all symbols from executables
1 parent 653a55f commit d24a98c

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed
 

‎build/config/compiler/BUILD.gn

+5-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ config("warnings_third_party") {
334334
}
335335

336336
config("symbols_default") {
337-
cflags = [ "-g${symbol_level}" ]
337+
if (strip_symbols) {
338+
cflags = [ "-s" ]
339+
} else {
340+
cflags = [ "-g${symbol_level}" ]
341+
}
338342
}
339343

340344
config("std_default") {

‎build/config/compiler/compiler.gni

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ declare_args() {
4848
# enable libfuzzer
4949
is_libfuzzer = false
5050

51+
# Remove all symbol table and relocation information from the binary.
52+
strip_symbols = false
53+
5154
# Generate code coverage analysis artifacts when enabled.
5255
use_coverage = false
5356

‎scripts/build/builders/tizen.py

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ def __init__(self,
117117

118118
if app == TizenApp.TESTS:
119119
self.extra_gn_options.append('chip_build_tests=true')
120+
# Tizen test driver creates ISO image with all unit test files. So,
121+
# it uses twice as much space as regular build. Due to CI storage
122+
# limitations, we need to strip debug symbols from executables.
123+
self.extra_gn_options.append('strip_symbols=true')
120124
self.build_command = 'check'
121125

122126
if not enable_ble:

‎third_party/tizen/tizen_sdk.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ template("tizen_qemu_mkisofs") {
189189
"mkisofs",
190190
"-input-charset=default",
191191
"-VCHIP", # Volume ID = CHIP
192-
"-JRU", # Joliet + Rock Ridge with untranslated filenames
192+
"-JrU", # Joliet + Rock Ridge with untranslated filenames
193193
]
194194

195195
# Exclude files from the ISO image which might otherwise be included

0 commit comments

Comments
 (0)
Please sign in to comment.