From 1807d79af7cc070212d1cb307454bbcc6e132905 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 19 Mar 2024 16:40:22 +0000 Subject: Add option to select GC implementation --- runtime/meson.build | 4 +++- runtime/meson_options.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 runtime/meson_options.txt (limited to 'runtime') diff --git a/runtime/meson.build b/runtime/meson.build index e6eafa7f..52463361 100644 --- a/runtime/meson.build +++ b/runtime/meson.build @@ -10,6 +10,8 @@ static_library( 'src/patio_test/patio_test.c', ) +gc_source = 'src/shed/gc' / get_option('gc') / 'gc.c' + static_library( 'shed', 'src/shed/effects.c', @@ -18,7 +20,7 @@ static_library( 'src/shed/primitives.c', 'src/shed/strings.c', 'src/shed/namespaces/Shed/Builtins.c', - 'src/shed/gc/mark-and-sweep/gc.c', + gc_source, ) if meson.get_external_property('shed_runtime_is_wasm', false) diff --git a/runtime/meson_options.txt b/runtime/meson_options.txt new file mode 100644 index 00000000..db2c715c --- /dev/null +++ b/runtime/meson_options.txt @@ -0,0 +1 @@ +option('gc', type : 'combo', choices : ['mark-and-sweep'], value : 'mark-and-sweep') -- cgit v1.2.3