aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-03-19 16:40:22 +0000
committerMichael Williamson <mike@zwobble.org>2024-03-19 16:40:38 +0000
commit1807d79af7cc070212d1cb307454bbcc6e132905 (patch)
tree5927d85e26ed7e996d987bff94b346aae16462cb /runtime
parent812d7c7992a09c1ef0fec9c00108540462d06211 (diff)
Add option to select GC implementation
Diffstat (limited to 'runtime')
-rw-r--r--runtime/meson.build4
-rw-r--r--runtime/meson_options.txt1
2 files changed, 4 insertions, 1 deletions
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')