Skip to content

Commit 16247af

Browse files
authored
🔧 (profiles): Remove debug symbols from release profile, compress debug sections (ARMmbed#147)
1 parent 1c00ec5 commit 16247af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/cmake/profiles/release.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function(mbed_set_profile_options target mbed_toolchain)
88
if(${mbed_toolchain} STREQUAL "GCC_ARM")
99
list(APPEND profile_c_compile_options
1010
"-Os"
11+
"-g0"
1112
)
1213
target_compile_options(${target}
1314
INTERFACE
@@ -18,6 +19,7 @@ function(mbed_set_profile_options target mbed_toolchain)
1819
"-fno-rtti"
1920
"-Wvla"
2021
"-Os"
22+
"-g0"
2123
)
2224
target_compile_options(${target}
2325
INTERFACE
@@ -33,6 +35,7 @@ function(mbed_set_profile_options target mbed_toolchain)
3335
)
3436

3537
list(APPEND profile_link_options
38+
"-Wl,--compress-debug-sections=zlib"
3639
"-Wl,--gc-sections"
3740
"-Wl,--wrap,main"
3841
"-Wl,--wrap,_malloc_r"

0 commit comments

Comments
 (0)