Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: strip file full path to save the code size
Cmake build provide absolute paths to compile files. If __FILE__ macros are used in the source code(ASSERT), the binary will be occupied by many invalid paths. This saves some memory, stops leaking user locations in binaries, makes failure logs more deterministic and most importantly makes builds more deterministic. Debuggers usually have a path mapping feature to ensure the files are still found. Test config sabre-6quad/citest: Before: $ size build/nuttx text data bss dec hex filename 279309 908 13652 293869 47bed build/nuttx After: $ size build/nuttx text data bss dec hex filename 269313 908 13652 283873 454e1 build/nuttx Signed-off-by: chao an <[email protected]>
- Loading branch information