[build] Enable DCE for bare-metal platforms
ISSUE:
@@ -38,7 +38,7 @@ _LD_DCE_FLAG_PRINT_SECTIONS=
when ($OS_DARWIN == "yes") {
_LD_DCE_FLAG_GC_SECTIONS=-Wl,-dead_strip
}
-elsewhen ($OS_LINUX == "yes" || $OS_ANDROID == "yes") {
+elsewhen ($OS_LINUX == "yes" || $OS_ANDROID == "yes" || $OS_NONE == "yes") {
_LD_DCE_FLAG_GC_SECTIONS=-Wl,--gc-sections
when ($LINKER_DCE_PRINT_SECTIONS == "yes") {
_LD_DCE_FLAG_PRINT_SECTIONS=-Wl,--print-gc-sections
