[libc-commits] [libc] [libc] Reduce binary size for baremetal targets (PR #121164)
via libc-commits
libc-commits at lists.llvm.org
Thu Dec 26 14:45:33 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Prabhuk (Prabhuk)
<details>
<summary>Changes</summary>
For `math` functions we must choose size optimized implementations.
Removing framepointers will also help with binary size savings.
---
Full diff: https://github.com/llvm/llvm-project/pull/121164.diff
1 Files Affected:
- (modified) libc/config/baremetal/config.json (+10)
``````````diff
diff --git a/libc/config/baremetal/config.json b/libc/config/baremetal/config.json
index dc4b0517d938df..85e80879d498e6 100644
--- a/libc/config/baremetal/config.json
+++ b/libc/config/baremetal/config.json
@@ -25,5 +25,15 @@
"LIBC_CONF_QSORT_IMPL": {
"value": "LIBC_QSORT_HEAP_SORT"
}
+ },
+ "math": {
+ "LIBC_CONF_MATH_OPTIMIZATIONS": {
+ "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)"
+ }
+ },
+ "codegen": {
+ "LIBC_CONF_KEEP_FRAME_POINTER": {
+ "value": false
+ }
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/121164
More information about the libc-commits
mailing list