From d37055a6a1ec0c86cc068460357c234fdaf0f87d Mon Sep 17 00:00:00 2001 From: Stone Tickle Date: Wed, 13 Oct 2021 09:39:42 -0500 Subject: [PATCH] implement meson.backend() --- src/functions/meson.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/functions/meson.c b/src/functions/meson.c index 13ede0ae..ef211ef0 100644 --- a/src/functions/meson.c +++ b/src/functions/meson.c @@ -119,6 +119,17 @@ func_meson_is_subproject(struct workspace *wk, obj _, uint32_t args_node, obj *r return true; } +static bool +func_meson_backend(struct workspace *wk, obj _, uint32_t args_node, obj *res) +{ + if (!interp_args(wk, args_node, NULL, NULL, NULL)) { + return false; + } + + *res = make_str(wk, "ninja"); + return true; +} + static bool func_meson_override_dependency(struct workspace *wk, obj _, uint32_t args_node, obj *res) { @@ -139,5 +150,6 @@ const struct func_impl_name impl_tbl_meson[] = { { "global_build_root", func_meson_global_build_root }, { "is_subproject", func_meson_is_subproject }, { "override_dependency", func_meson_override_dependency }, + { "backend", func_meson_backend }, { NULL, NULL }, }; -- 2.45.2