Skip to content

Commit

Permalink
chore(deps): bump rules_foreign_cc from 0.9.0 to 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed May 13, 2024
1 parent 5dd14cb commit f21da41
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 28 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ load_bindings(name = "kong_bindings")

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 = "476303bd0f1b04cc311fc258f1708a5f6ef82d3091e53fd1977fa20383425a6a",
strip_prefix = "rules_foreign_cc-0.10.1",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.10.1.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,16 +201,16 @@ 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({
# any cross build that migrated to use libxcrypt needs those flags
# alpine uses different libc so doesn't need it
":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 @@ -222,8 +222,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 f21da41

Please sign in to comment.