diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-03-26 11:33:30 +0100 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-03-28 21:07:53 +0200 |
commit | 04fd630ec184fa1da44881dbb0ffafa67c15d4cf (patch) | |
tree | 1e7d394331f9c487a772795720a6b5f77e1e956a /WORKSPACE.bazel | |
parent | d49257eb091b193d1a6cf0d37d778ae4fbc247a5 (diff) | |
download | jazzer-api-04fd630ec184fa1da44881dbb0ffafa67c15d4cf.tar.gz |
Shade external dependencies
Fuzz targets may use the ASM libraries or JaCoCo themselves, which
can lead to dependency version conflicts.
To counter this, we shade all our external dependencies into the
com.code_intelligence.jazzer.third_party.* package using bazel_jar_jar
when we build the instrumentor library.
The seemingly simpler approach of applying jar shading directly to the
jazzer_agent_deploy.jar does not work as jarjar is unable to handle
some of the Kotlin runtime files in the resulting jar.
Diffstat (limited to 'WORKSPACE.bazel')
-rw-r--r-- | WORKSPACE.bazel | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index d54cdba4..b6310dd7 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -213,3 +213,20 @@ http_archive( strip_prefix = "llvm-project-llvmorg-12.0.0-rc3", url = "https://github.com/llvm/llvm-project/archive/llvmorg-12.0.0-rc3.tar.gz", ) + +# bazel_jar_jar + +bazel_jar_jar_commit = "171f268569384c57c19474b04aebe574d85fde0d" + +bazel_jar_jar_sha = "97c5f862482a05f385bd8f9d28a9bbf684b0cf3fae93112ee96f3fb04d34b193" + +http_archive( + name = "com_github_johnynek_bazel_jar_jar", + sha256 = bazel_jar_jar_sha, + strip_prefix = "bazel_jar_jar-%s" % bazel_jar_jar_commit, + url = "https://github.com/johnynek/bazel_jar_jar/archive/%s.tar.gz" % bazel_jar_jar_commit, +) + +load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories") + +jar_jar_repositories() |