aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Meumertzheim <meumertzheim@code-intelligence.com>2021-06-25 10:27:36 +0200
committerFabian Meumertzheim <fabian@meumertzhe.im>2021-06-25 11:25:04 +0200
commit4179c2f486339ca71a4eb979a81f92ea51bd5c9b (patch)
tree4f6ca29a981f0ed7986006b3ccf3bc4637315eb9
parent2f09830e39892080afe8a678acb496a5f0529b2c (diff)
downloadjazzer-api-4179c2f486339ca71a4eb979a81f92ea51bd5c9b.tar.gz
Consistently use neverlink jazzer_api dep
The Jazzer API should not be linked as it is provided by the agent at runtime. Enforce this by limiting the visibility of the runtime dep to //:__pkg__, where the _deploy.jar target is needed for Maven publication.
-rw-r--r--agent/BUILD.bazel2
-rw-r--r--bazel/fuzz_target.bzl2
-rw-r--r--examples/BUILD.bazel2
3 files changed, 3 insertions, 3 deletions
diff --git a/agent/BUILD.bazel b/agent/BUILD.bazel
index fdb4f2df..416d7e27 100644
--- a/agent/BUILD.bazel
+++ b/agent/BUILD.bazel
@@ -18,7 +18,7 @@ java_binary(
java_binary(
name = "jazzer_api",
create_executable = False,
- visibility = ["//visibility:public"],
+ visibility = ["//:__pkg__"],
runtime_deps = ["//agent/src/main/java/com/code_intelligence/jazzer/api"],
)
diff --git a/bazel/fuzz_target.bzl b/bazel/fuzz_target.bzl
index e920e1a7..fa493b51 100644
--- a/bazel/fuzz_target.bzl
+++ b/bazel/fuzz_target.bzl
@@ -35,7 +35,7 @@ def java_fuzz_target_test(
# Deps can only be specified on java_binary targets with sources, which
# excludes e.g. Kotlin libraries wrapped into java_binary via runtime_deps.
- target_deps = deps + ["//agent/src/main/java/com/code_intelligence/jazzer/api"] if srcs else []
+ target_deps = deps + ["//agent:jazzer_api_compile_only"] if srcs else []
java_binary(
name = target_name,
srcs = srcs,
diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel
index d7f0f8cd..08c93bd2 100644
--- a/examples/BUILD.bazel
+++ b/examples/BUILD.bazel
@@ -195,7 +195,7 @@ kt_jvm_library(
"src/main/java/com/example/KlaxonFuzzer.kt",
],
deps = [
- "//agent/src/main/java/com/code_intelligence/jazzer/api",
+ "//agent:jazzer_api_compile_only",
"@maven//:com_beust_klaxon",
],
)