[libc-commits] [libc] [libc] Disable math exceptions for baremetal (PR #180863)
Prabhu Rajasekaran via libc-commits
libc-commits at lists.llvm.org
Tue Feb 10 15:50:03 PST 2026
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/180863
To further save code size for baremetal builds, disable math function
exceptions.
>From 575b7c836521b5fea6903a6578b79288ae521535 Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Tue, 10 Feb 2026 15:45:50 -0800
Subject: [PATCH] [libc] Disable math exceptions for baremetal
To further save code size for baremetal builds, disable math function
exceptions.
---
libc/config/baremetal/config.json | 2 +-
libc/config/config.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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": "",
More information about the libc-commits
mailing list