[libc-commits] [libc] 7deaed9 - [libc] Reduce binary size for baremetal targets (#121164)

via libc-commits libc-commits at lists.llvm.org
Thu Dec 26 15:55:43 PST 2024


Author: Prabhuk
Date: 2024-12-26T15:55:39-08:00
New Revision: 7deaed975eecf78797649b731506478f3d6ccd59

URL: https://github.com/llvm/llvm-project/commit/7deaed975eecf78797649b731506478f3d6ccd59
DIFF: https://github.com/llvm/llvm-project/commit/7deaed975eecf78797649b731506478f3d6ccd59.diff

LOG: [libc] Reduce binary size for baremetal targets (#121164)

For `math` functions we must choose size optimized implementations.
Removing framepointers will also help with binary size savings.

Added: 
    

Modified: 
    libc/config/baremetal/config.json

Removed: 
    


################################################################################
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
+    }
   }
 }


        


More information about the libc-commits mailing list