Skip to content

Commit

Permalink
Added native zstd lib to package-zip
Browse files Browse the repository at this point in the history
  • Loading branch information
glukasiknuro committed Aug 19, 2020
1 parent 279d9e0 commit 24b67dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ filegroup(
"//src/main/tools:jdk-support",
"//src/main/tools:linux-sandbox",
"//tools/osx:xcode-locator",
"//third_party/zstd-jni:target-os-native-lib",
] + select({
"//src/conditions:windows": [],
"//conditions:default": [
Expand Down
20 changes: 14 additions & 6 deletions third_party/zstd-jni/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ genrule(
output_to_bindir = 1,
)

filegroup(
name = "target-os-native-lib",
srcs = select({
"//src/conditions:darwin": ["//third_party/zstd-jni:libzstd-jni.dylib"],
"//src/conditions:darwin_x86_64": ["//third_party/zstd-jni:libzstd-jni.dylib"],
"//src/conditions:windows": ["//third_party/zstd-jni:libzstd-jni.dll"],
"//conditions:default": ["//third_party/zstd-jni:libzstd-jni.so"],
}),
visibility = [
"//src:__pkg__",
],
)

java_library(
name = "zstd-jni",
srcs = glob(
Expand All @@ -111,11 +124,6 @@ java_library(
],
),
visibility = ["//visibility:public"],
data = select({
"//src/conditions:darwin": ["//third_party/zstd-jni:libzstd-jni.dylib"],
"//src/conditions:darwin_x86_64": ["//third_party/zstd-jni:libzstd-jni.dylib"],
"//src/conditions:windows": ["//third_party/zstd-jni:libzstd-jni.dll"],
"//conditions:default": ["//third_party/zstd-jni:libzstd-jni.so"],
}),
data = [":target-os-native-lib"],
deps = ["@bazel_tools//tools/java/runfiles"],
)

0 comments on commit 24b67dc

Please sign in to comment.