Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Sep 6, 2024
1 parent 950bfc3 commit 15d4ad1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
13 changes: 3 additions & 10 deletions build/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@kong_bindings//:variables.bzl", "KONG_VAR")

Check failure on line 1 in build/BUILD.bazel

View workflow job for this annotation

GitHub Actions / Auto-format and Check

Please run buildifier. diff --git a/build/BUILD.bazel b/build/BUILD.bazel index aea6e2b..91b9966 100644 --- a/build/BUILD.bazel +++ b/build/BUILD.bazel @@ -1,6 +1,6 @@ load("@kong_bindings//:variables.bzl", "KONG_VAR") load("@bazel_skylib//lib:selects.bzl", "selects") -load("//build:build_system.bzl", "get_workspace_name", "kong_genrule", "kong_install", "kong_rules_group", "kong_template_file", "get_clib_deps") +load("//build:build_system.bzl", "get_clib_deps", "get_workspace_name", "kong_genrule", "kong_install", "kong_rules_group", "kong_template_file") load("@kong//build/openresty/wasmx/filters:variables.bzl", "WASM_FILTERS_TARGETS") exports_files([
load("@bazel_skylib//lib:selects.bzl", "selects")
load("//build:build_system.bzl", "get_workspace_name", "kong_genrule", "kong_install", "kong_rules_group", "kong_template_file")
load("//build:build_system.bzl", "get_workspace_name", "kong_genrule", "kong_install", "kong_rules_group", "kong_template_file", "get_clib_deps")
load("@kong//build/openresty/wasmx/filters:variables.bzl", "WASM_FILTERS_TARGETS")

exports_files([
Expand All @@ -9,28 +9,21 @@ exports_files([

# C libraries

clib_deps = [
"@openssl",
"@libexpat",
"@snappy",
"@ada",
]

[
kong_install(
name = "install-%s" % get_workspace_name(k),
src = k,
prefix = "kong/lib" if k in ("@passwdqc", "@snappy", "@ada") else "kong",
strip_path = "snappy" if k == "@snappy" else "ada" if k == "@ada" else "",
)
for k in clib_deps
for k in get_clib_deps()
]

kong_rules_group(
name = "install-clibs",
propagates = [
":install-%s" % get_workspace_name(k)
for k in clib_deps
for k in get_clib_deps()
],
visibility = ["//visibility:public"],
)
Expand Down
11 changes: 11 additions & 0 deletions build/build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,14 @@ kong_install = rule(

def get_workspace_name(label):
return label.replace("@", "").split("/")[0]

def get_clib_deps():
return [
"@openssl",
"@libexpat",
"@snappy",
] + select({
"@kong//:ada_flag": ["@ada"],
"//conditions:default": [],
})

0 comments on commit 15d4ad1

Please sign in to comment.