-
-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Add a minimal baremetal testsuite to Phobos #6641
Conversation
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + phobos#6641" |
dlang/tools#357 (also supports just strings, e.g. |
Posted about how the UDA (e.g. |
I don't care for the term baremetal; I suggest freestanding instead. But, I also notice that this seems to still link in the C standard library. Also, Ultimately, though, D should have a Note also the freestanding-on-linux is not the same as freestanding-on-AMD64, freestanding-on-x86, freestanding-on-AArch64, etc. We'll need the D runtime to have implementations of all those scenarios, and preferably a CI that can actually exercise them (maybe in virtual environment like VirtualBox, QEMU, etc. or if possible on physical hardware). |
What is the use case? |
To test that some functions in Phobos don't depend on druntime at all which is important for people like @JinShil who would love to use parts of Phobos in their baremetal development. |
Similarly to #6640, this will allow to add tests to Phobos for functionality that doesn't depend on libc.
It currently contains a minimal Linux x86 runtime.
Future
We probably want to add a special UDA (e.g.
@test-baremetal
and@test-betterc
) to Phobos and thus extract such tests automatically (instead of keeping them separate).Another possible route is to combine this with the testsuite runner of DMD or at least have support for minimal things like
TEST_OUTPUT
.CC @ZombineDev