Skip to content

Commit

Permalink
fix(build): fix snappy shared library build on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Apr 25, 2024
1 parent 5cd2b07 commit 66b01ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ common --color=yes
common --curses=auto

build --experimental_ui_max_stdouterr_bytes=10485760
build --experimental_cc_shared_library

build --show_progress_rate_limit=0
build --show_timestamps
Expand Down
2 changes: 1 addition & 1 deletion build/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ kong_directory_genrule(
chmod -R "+rw" ${BUILD_DESTDIR}/openresty/luajit
SNAPPY=${WORKSPACE_PATH}/$(dirname $(echo '$(locations @snappy//:snappy)' | awk '{print $1}'))
cp ${SNAPPY}/libsnappy.so ${BUILD_DESTDIR}/kong/lib
cp ${SNAPPY}/libsnappy.${libext} ${BUILD_DESTDIR}/kong/lib
LUAROCKS=${WORKSPACE_PATH}/$(dirname '$(location @luarocks//:luarocks_make)')/luarocks_tree
cp -r ${LUAROCKS}/. ${BUILD_DESTDIR}/.
Expand Down
7 changes: 6 additions & 1 deletion build/openresty/snappy/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ cc_library(
)

cc_library(
name = "snappy",
name = "snappy.a",
srcs = [
"snappy.cc",
"snappy-c.cc",
Expand All @@ -84,6 +84,11 @@ cc_library(
],
)

cc_shared_library(
name = "snappy",
deps = [":snappy.a"],
)

filegroup(
name = "testdata",
srcs = glob(["testdata/*"]),
Expand Down

0 comments on commit 66b01ff

Please sign in to comment.