From ba68b10ed686829e326fb955857718d4cfa53486 Mon Sep 17 00:00:00 2001 From: Tom Wallis Date: Tue, 21 Nov 2023 19:48:47 +0000 Subject: [PATCH] Skip `cap_build` example unless on Morello CI was failing due to missing symbols, because it was compiling for riscv but cap_build relies on morello-specific symbols. --- cap_build.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cap_build.c b/cap_build.c index f08aae9..294b743 100644 --- a/cap_build.c +++ b/cap_build.c @@ -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 @@ -150,4 +155,5 @@ int main() free((void *) y_ptr); free(my_cap_mem); return 0; +#endif }