Skip to content

Commit

Permalink
Skip cap_build example unless on Morello
Browse files Browse the repository at this point in the history
CI was failing due to missing symbols, because it was compiling for
riscv but cap_build relies on morello-specific symbols.
  • Loading branch information
probablytom committed Nov 21, 2023
1 parent c18cdf7 commit ba68b10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cap_build.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@

int main()
{
// This example relies on morello-specific symbols, so we won't run
// it on anything else.
#if !(defined(__aarch64__) && __ARM_ARCH == 8)
printf("Skipping; this example only runs on morello.");
#else
// We create two capabilities: x, and y, which is derived from x. We note
// that, though we use `cheri_address_set()`, it doesn't actually set (i.e.
// _change_) the address of its arguments, but construct a new capability
Expand Down Expand Up @@ -150,4 +155,5 @@ int main()
free((void *) y_ptr);
free(my_cap_mem);
return 0;
#endif
}

0 comments on commit ba68b10

Please sign in to comment.