summaryrefslogtreecommitdiff
path: root/libc/src/stdio/baremetal/putchar.cpp
AgeCommit message (Collapse)Author
2025-09-01Revert "[libc] Migrate from baremetal stdio.h to generic stdio.h" (#156371)William Huynh
Reverts llvm/llvm-project#152748
2025-09-01[libc] Migrate from baremetal stdio.h to generic stdio.h (#152748)William Huynh
This is a follow up to the RFC here: https://discourse.llvm.org/t/rfc-implementation-of-stdio-on-baremetal/86944 This provides the stdout/stderr/stdin symbols (which now don't have to provided by the user). This allows the user to have access to all functions, currently I've only tested `fprintf` but in theory everything that works in the generic folder should work in the baremetal configuration. All streams are _non-buffered_, which does NOT require flushing. It is based on the CookieFile that already existed
2025-06-16[libc] Change default behaviour of baremetal/printf to use stdout (#143703)William Huynh
In #94078, `write_to_stdout` had not been fully implemented. However, now that it has been implemented, to conform with the C standard (7.23.6.3. The printf function, specifically point 2), we use `stdout`. This issue is tracked in #94685. - Also prefer `static constexpr` - Made it explicit that we are writing to `stdout`
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2024-06-12[libc] Add baremetal putchar (#95182)Michael Jones
In #94685 I discussed my ideas for cleaner baremetal output writing. This patch is not that. This patch just uses `write_to_stderr` for outputting from putchar and printf on baremetal. I'm still planning to create a proper design for writing to stdout and stderr on various platforms, but that will be a followup patch.