[libc] Enable floating point support for baremetal printf#101912
Closed
petrhosek wants to merge 1 commit into
Closed
[libc] Enable floating point support for baremetal printf#101912petrhosek wants to merge 1 commit into
petrhosek wants to merge 1 commit into
Conversation
It's somewhat common for baremetal projects to use floating point so printf support is actually desirable.
Member
|
@llvm/pr-subscribers-libc Author: Petr Hosek (petrhosek) ChangesIt's somewhat common for baremetal projects to use floating point so printf support is actually desirable. Full diff: https://github.com/llvm/llvm-project/pull/101912.diff 1 Files Affected:
diff --git a/libc/config/baremetal/config.json b/libc/config/baremetal/config.json
index f0ff268b56275..f5b260d805c93 100644
--- a/libc/config/baremetal/config.json
+++ b/libc/config/baremetal/config.json
@@ -5,9 +5,6 @@
}
},
"printf": {
- "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
- "value": true
- },
"LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
"value": true
},
|
PiJoules
approved these changes
Aug 5, 2024
michaelrj-google
approved these changes
Aug 5, 2024
Member
michaelrj-google
left a comment
There was a problem hiding this comment.
This will work, but I will warn you that printf float support will increase binary size significantly.
Contributor
Yeah, It's disabled on the GPU because it makes compilation take forever even with the long double table turned off. I floated the idea of allowing |
Member
Author
|
Superseded by #199758. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's somewhat common for baremetal projects to use floating point so printf support is actually desirable.
fixes #100816