Skip to content

Commit

Permalink
chore(build): do not download wasm runtime unless requested
Browse files Browse the repository at this point in the history
  • Loading branch information
flrgh committed Jul 24, 2023
1 parent b572db8 commit 265c007
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions build/openresty/BUILD.openresty.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,29 @@ CONFIGURE_OPTIONS = [
"//conditions:default": [],
})

wasmx_build_data = select({
"@kong//:wasmx_flag": [
"@ngx_wasm_module//:all_srcs",
],
"//conditions:default": [],
}) + select({
"@kong//:wasmx_v8": [
"@v8//:all_srcs",
"@openresty//:wasmx_v8_ar",
],
"//conditions:default": [],
}) + select({
"@kong//:wasmx_wasmer": [
"@wasmer//:all_srcs",
],
"//conditions:default": [],
}) + select({
"@kong//:wasmx_wasmtime": [
"@wasmtime//:all_srcs",
],
"//conditions:default": [],
})

# TODO: set prefix to populate pid_path, conf_path, log_path etc

filegroup(
Expand All @@ -295,12 +318,7 @@ configure_make(
"@lua-resty-lmdb//:all_srcs",
"@lua-resty-events//:all_srcs",
"@openresty_binding//:all_srcs",
"@ngx_wasm_module//:all_srcs",
"@v8//:all_srcs",
"@wasmer//:all_srcs",
"@wasmtime//:all_srcs",
"@openresty//:wasmx_v8_ar",
],
] + wasmx_build_data,
configure_command = "configure",
configure_in_place = True,
configure_options = CONFIGURE_OPTIONS,
Expand Down

0 comments on commit 265c007

Please sign in to comment.