-
Enhancement
-
Resolution: Implemented
-
Medium
-
Code Generation Tools
-
CODEGEN-10301
-
-
ARMCLANG_4.0.0.LTS*
-
default
Start with this program ...
#include <iostream> int main() { std::cout << "hello, world!" << std::endl; }
Build it with link-time optimization and the most aggressive setting for smaller code size ...
% tiarmclang -flto -Oz file.cpp -o lto_oz.out -Wl,-c,-m=lto_oz.map
The size numbers are dominated by 1 file from the RTS libraries. These lines are from the MODULE SUMMARY part of the map file ...
Module code ro data rw data ------ ---- ------- ------- ... C:\ti\compilers\ti-cgt-armllvm_2.1.0.LTS\lib\armv7em-ti-none-eabihf/libc++.a locale.cpp.obj 95844 4398 244
About 2/3 of the code size comes from this one file.
Please explore what can be done to reduce the amount of memory required by locale and related functions.