add a regression test that tests for the presence of "compiler-rt" intrinsics #36636
Labels
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
We need this to make sure we don't accidentally lose any intrinsic during the process of porting
them to Rust (#35437).
One possible way to do this is to just compile a program, like the one below, that depends on
several intrinsics:
If, by mistake,
compiler_builtins
stops providing an intrinsic like__mulodi4
then the aboveprogram will fail to link with message like this:
So, in a sense, this is a link-pass test :-).
We'll have to update our testing machinery to compile this program for all targets and cross
targets, even if we only provide
std
for them, via somemake
invocation.The tricky bit of this approach is that we have to figure out how make the program above include all
the intrinsics we are interested in testing. In some cases, an arithmetic expression lowers to an
intrinsic if the target doesn't support the operation natively (see
mulodi
andaeabi_uldivmod
inthe program above). But, I'm not sure if we can generate all the intrinsics we care about that way (I
hope so though).
cc @alexcrichton @brson
blocks #35437
The text was updated successfully, but these errors were encountered: