[libc-commits] [libc] 91224e3 - [libc] Disable math exceptions for baremetal (#180863)
via libc-commits
libc-commits at lists.llvm.org
Tue Feb 10 16:49:10 PST 2026
Author: Prabhu Rajasekaran
Date: 2026-02-10T16:49:05-08:00
New Revision: 91224e35fdd9f43faf87880749d693394b942fcb
URL: https://github.com/llvm/llvm-project/commit/91224e35fdd9f43faf87880749d693394b942fcb
DIFF: https://github.com/llvm/llvm-project/commit/91224e35fdd9f43faf87880749d693394b942fcb.diff
LOG: [libc] Disable math exceptions for baremetal (#180863)
To further save code size for baremetal builds, disable math function
exceptions.
Added:
Modified:
libc/config/baremetal/config.json
libc/config/config.json
Removed:
################################################################################
diff --git a/libc/config/baremetal/config.json b/libc/config/baremetal/config.json
index 2c9bfeb20541c..5edc045b5782f 100644
--- a/libc/config/baremetal/config.json
+++ b/libc/config/baremetal/config.json
@@ -58,7 +58,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 54d1282df6293..088e94fb2c22f 100644
--- a/libc/config/config.json
+++ b/libc/config/config.json
@@ -126,7 +126,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": "",
More information about the libc-commits
mailing list