[RFC] Add a minimal baremetal testsuite to Phobos#6641
[RFC] Add a minimal baremetal testsuite to Phobos#6641wilzbach wants to merge 1 commit intodlang:masterfrom
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-baremetaland@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