Skip to content

Commit af66969

Browse files
allsey87James Sharpe
andauthored
Add setup_args and run meson setup explictly (#1223)
Co-authored-by: James Sharpe <[email protected]>
1 parent d58cdf6 commit af66969

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

foreign_cc/meson.bzl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,13 @@ def _create_meson_script(configureParameters):
110110

111111
prefix = "{} ".format(expand_locations_and_make_variables(ctx, attrs.tool_prefix, "tool_prefix", data)) if attrs.tool_prefix else ""
112112

113-
script.append("{prefix}{meson} --prefix={install_dir} {options} {source_dir}".format(
113+
setup_args_str = " ".join(expand_locations_and_make_variables(ctx, ctx.attr.setup_args, "setup_args", data))
114+
115+
script.append("{prefix}{meson} setup --prefix={install_dir} {setup_args} {options} {source_dir}".format(
114116
prefix = prefix,
115117
meson = attrs.meson_path,
116118
install_dir = "$$INSTALLDIR$$",
119+
setup_args = setup_args_str,
117120
options = options_str,
118121
source_dir = "$$EXT_BUILD_ROOT$$/" + root,
119122
))
@@ -171,6 +174,10 @@ def _attrs():
171174
mandatory = False,
172175
default = {},
173176
),
177+
"setup_args": attr.string_list(
178+
doc = "Arguments for the Meson setup command",
179+
mandatory = False,
180+
),
174181
})
175182
return attrs
176183

0 commit comments

Comments
 (0)