[libc-commits] [libc] [libc] Disable math exceptions for baremetal (PR #180863)
via libc-commits
libc-commits at lists.llvm.org
Tue Feb 10 15:51:31 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Prabhu Rajasekaran (Prabhuk)
<details>
<summary>Changes</summary>
To further save code size for baremetal builds, disable math function
exceptions.
---
Full diff: https://github.com/llvm/llvm-project/pull/180863.diff
2 Files Affected:
- (modified) libc/config/baremetal/config.json (+1-1)
- (modified) libc/config/config.json (+1-1)
``````````diff
diff --git a/libc/config/baremetal/config.json b/libc/config/baremetal/config.json
index af5b6115c87e0..468d3433418e6 100644
--- a/libc/config/baremetal/config.json
+++ b/libc/config/baremetal/config.json
@@ -55,7 +55,7 @@
},
"math": {
"LIBC_CONF_MATH_OPTIMIZATIONS": {
- "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT)"
+ "value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT | LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT)"
}
},
"general": {
diff --git a/libc/config/config.json b/libc/config/config.json
index b37154e294ec9..c8f6d84dcd6f8 100644
--- a/libc/config/config.json
+++ b/libc/config/config.json
@@ -123,7 +123,7 @@
"math": {
"LIBC_CONF_MATH_OPTIMIZATIONS": {
"value": 0,
- "doc": "Configure optimizations for math functions. Values accepted are LIBC_MATH_SKIP_ACCURATE_PASS, LIBC_MATH_SMALL_TABLES, LIBC_MATH_NO_ERRNO, LIBC_MATH_NO_EXCEPT, and LIBC_MATH_FAST."
+ "doc": "Configure optimizations for math functions. Values accepted are LIBC_MATH_SKIP_ACCURATE_PASS, LIBC_MATH_SMALL_TABLES, LIBC_MATH_NO_ERRNO, LIBC_MATH_NO_EXCEPT, LIBC_MATH_FAST, and LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT."
},
"LIBC_CONF_FREXP_INF_NAN_EXPONENT": {
"value": "",
``````````
</details>
https://github.com/llvm/llvm-project/pull/180863
More information about the libc-commits
mailing list