-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Currently the needs-target-std compiletest directive does not work for riscv32cheriot-unknown-cheriotrtos, in the sense that tests with that directive aren't ignored.
As pointed out on a related thread on Zulip, the reason should be this function not fitting the scheme of the CHERIoT target.
This directive is necessary to make ./x test tests/codegen-llvm --target=riscv32cheriot-unknown-cheriotrtos one step closer to working how it should, that is, not complaining about std not being found for CHERIoT. The same can of course be said of other sets of tests that could today work on CHERIoT (i.e. those that do not require running the tests on the target) such as assembly-llvm.
As a bonus, it also removes the need for no-std = true in the bootstrap file.
To this end we should:
- Patch the function linked above to return
falsewhen targeting CHERIoT; - add
only-riscv32cheriot-unknown-cheriotrtosdirective tocompiletestso that./x testdoes not fail when running a CHERIoT-specific test when the target is not CHERIoT; and - add
needs-target-stddirectives to all the tests incodegen-llvmthat usestdso that they are ignored when running tests for CHERIoT.
The last point is debatable and only partially correct: all the tests that don't have a #![no_std] annotation now might actually use only items that can be found either in core or alloc.
Edit: Another important directive to investigate is only-64bits. It currently matches CHERIoT on account that for this target it is target.pointer_width = 64. Adding a ignore-riscv32cheriot-unknown-cheriotrtos directive can help mitigate issues related to that directive while we figure out a better solution (for example not relying on the ambiguous pointer_width value).