Skip to content

Commit

Permalink
chore(deps): bump rules_foreign_cc from 0.9.0 to 0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Sep 4, 2024
1 parent 9985402 commit 3bbec14
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 28 deletions.
17 changes: 14 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,22 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

http_archive(
name = "bazel_features",
sha256 = "ba1282c1aa1d1fffdcf994ab32131d7c7551a9bc960fbf05f42d55a1b930cbfb",
strip_prefix = "bazel_features-1.15.0",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.15.0/bazel_features-v1.15.0.tar.gz",
)

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

http_archive(
name = "rules_foreign_cc",
sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51",
strip_prefix = "rules_foreign_cc-0.9.0",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz",
sha256 = "a2e6fb56e649c1ee79703e99aa0c9d13c6cc53c8d7a0cbb8797ab2888bbc99a3",
strip_prefix = "rules_foreign_cc-0.12.0",
url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/0.12.0/rules_foreign_cc-0.12.0.tar.gz",
)

load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
Expand Down
2 changes: 0 additions & 2 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ The build system requires the following tools to be installed:
# check bazel version
bazel version
```
- [Python](https://www.python.org/), Python 3 is used to build some of the dependencies. Note: build system relies on `python`
in the PATH; if you have `python3` you need to create a symlink from `python` to `python3`
- [Build dependencies](https://github.com/Kong/kong/blob/master/DEVELOPER.md#build-and-install-from-source)

**Note**: Bazel relies on logged user to create the temporary file system; however if your username contains `@`
Expand Down
7 changes: 0 additions & 7 deletions build/kong_bindings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ def _check_sanity(ctx):
"The following command is useful to check if Xcode is picked up by Bazel:\n" +
"eval `find /private/var/tmp/_bazel_*/|grep xcode-locator|head -n1`")

python = ctx.execute(["which", "python"]).stdout.strip()
if not python:
fail("rules_foreign_cc hasn't migrated to python3 on macOS yet, and your system doens't \n" +
"have a `python` binary. Consider create a symlink to `python3` and include in PATH:\n" +
"ln -s `which python3` /usr/local/bin/python\n" +
"export PATH=/usr/local/bin:$PATH bazel build <target>\n")

user = ctx.os.environ.get("USER", "")
if "@" in user:
fail("Bazel uses $USER in cache and rule_foreign_cc uses `@` in its sed command.\n" +
Expand Down
4 changes: 2 additions & 2 deletions build/luarocks/BUILD.luarocks.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ configure_make(
configure_in_place = True,
configure_options = [
"--lua-suffix=jit",
"--with-lua=$$EXT_BUILD_DEPS$$/luajit",
"--with-lua-include=$$EXT_BUILD_DEPS$$/luajit/include/luajit-2.1",
"--with-lua=$$EXT_BUILD_DEPS/luajit",
"--with-lua-include=$$EXT_BUILD_DEPS/luajit/include/luajit-2.1",
],
lib_source = ":all_srcs",
out_bin_dir = "",
Expand Down
28 changes: 14 additions & 14 deletions build/openresty/BUILD.openresty.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ CONFIGURE_OPTIONS = [
"--without-http_redis_module",
"--without-http_rds_json_module",
"--without-http_rds_csv_module",
"--with-luajit=$$EXT_BUILD_DEPS$$/luajit",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/pcre/include\"",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/openssl/include\"",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/luajit/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/pcre/lib\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/openssl/lib\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/luajit/lib\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/lib\"",
"--with-luajit=$$EXT_BUILD_DEPS/luajit",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS/pcre/include\"",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS/openssl/include\"",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS/luajit/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS/pcre/lib\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS/openssl/lib\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS/luajit/lib\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS/lib\"",
# Here let's try not having --disable-new-dtags; --disable-new-dtags creates rpath instead of runpath
# note rpath can't handle indirect dependency (nginx -> luajit -> dlopen("other")), so each indirect
# dependency should have its rpath set (luajit, libxslt etc); on the other side, rpath is not
Expand Down Expand Up @@ -201,14 +201,14 @@ CONFIGURE_OPTIONS = [
"//conditions:default": [],
}) + select({
"@kong//:any-cross": [
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/zlib/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/zlib/lib\"",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS/zlib/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS/zlib/lib\"",
],
"//conditions:default": [],
}) + select({
":needs-xcrypt2": [
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/libxcrypt/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/libxcrypt/lib\"",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS/libxcrypt/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS/libxcrypt/lib\"",
],
"//conditions:default": [],
}) + select({
Expand All @@ -220,8 +220,8 @@ CONFIGURE_OPTIONS = [
"//conditions:default": [],
}) + select({
"@kong//:fips_flag": [
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS$$/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS$$/lib -Wl,-Bsymbolic-functions -Wl,-z,relro\"",
"--with-cc-opt=\"-I$$EXT_BUILD_DEPS/include\"",
"--with-ld-opt=\"-L$$EXT_BUILD_DEPS/lib -Wl,-Bsymbolic-functions -Wl,-z,relro\"",
],
"//conditions:default": [],
}) + select({
Expand Down

0 comments on commit 3bbec14

Please sign in to comment.