Skip to content

Conversation

@8lall0
Copy link

@8lall0 8lall0 commented Nov 5, 2025

This feature adds an option from project.json and build options to disable libc unreachable statements in order to be able to implement one for yourself. Useful feature for bare metal developing.

This feature adds an option from project.json and build options to disable libc unreachable statements in order to be able to implement one for yourself.
Useful feature for bare metal developing.
macro CFile stderr() { return (CFile*)(uptr)STDERR_FD; }

module libc @if(!env::LIBC);
module libc @if(!env::LIBC && !env::IMPLEMENT_LIBC);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than doing this, let's change this to env::NO_LIBC and then only set env::NO_LIBC is neither exists. Also look at the ones doing @if(env::LIBC) to see if they should be included when LIBC is implemented by the custom libc

Copy link
Author

@8lall0 8lall0 Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO_LIBC is set by "link-libc", so are you suggesting to use that mechanism?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think he means changing the definition of NO_LIBC to something like const bool NO_LIBC = !LIBC && !CUSTOM_LIBC

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes exactly.

@lerno
Copy link
Collaborator

lerno commented Nov 10, 2025

Rename implement-libc to custom-libc

@lerno
Copy link
Collaborator

lerno commented Nov 20, 2025

Ping!

@8lall0
Copy link
Author

8lall0 commented Nov 21, 2025

Ping!

I'm dealing with a heavy flu right now xD sorry for the delay, i'm unable to do anything atm

@lerno
Copy link
Collaborator

lerno commented Nov 24, 2025

It's fine, I hope you get well soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants