From b8fc4287839236f239baa9de35dbe0141b56cbf7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 20 Dec 2023 16:10:41 +0000 Subject: Add executable to find size of jmp_buf --- runtime/meson.build | 3 +++ runtime/src/jmp_buf/sizeof_jmp_buf.c | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 runtime/src/jmp_buf/sizeof_jmp_buf.c (limited to 'runtime') diff --git a/runtime/meson.build b/runtime/meson.build index 2b90b2fe..569d2d92 100644 --- a/runtime/meson.build +++ b/runtime/meson.build @@ -1,4 +1,5 @@ project('shed-runtime', 'c', default_options : ['warning_level=1']) + static_library( 'shed', 'src/patio/exceptions.c', @@ -17,4 +18,6 @@ if meson.get_external_property('shed_runtime_is_wasm', false) 'deps/walloc/walloc.c', override_options : ['warning_level=0'], ) +else + executable('sizeof_jmp_buf', 'src/jmp_buf/sizeof_jmp_buf.c') endif diff --git a/runtime/src/jmp_buf/sizeof_jmp_buf.c b/runtime/src/jmp_buf/sizeof_jmp_buf.c new file mode 100644 index 00000000..f08825d4 --- /dev/null +++ b/runtime/src/jmp_buf/sizeof_jmp_buf.c @@ -0,0 +1,8 @@ +#include +#include + +int main() { + printf("%lu\n", sizeof(jmp_buf)); + + return 0; +} -- cgit v1.2.3