diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-08-06 07:56:51 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-08-09 09:22:07 +0200 |
commit | 3282049bdf62d053a7ac9a0157ca3ef0f0c4ec27 (patch) | |
tree | b7710bc10daf7f89e1551b054659e4774f07b169 /repositories.bzl | |
parent | fe5e2bd92cfd89d74b83dffe620bc08d459a398c (diff) | |
download | jazzer-api-3282049bdf62d053a7ac9a0157ca3ef0f0c4ec27.tar.gz |
Find libjvm with a repository rule
libjvm lives in different subpaths of JAVA_HOME, depending both on the
OS and the Java version. Since it is currently not possible to select a
dependency based on the Java version, supporting Java 8 required a
custom build setting. This also broke bazel query (but not cquery).
By loading libjvm from a simple repository rule, we can cover all
OSes and Java versions with a single dependency, even if libjvm.so is
installed in a non-standard location.
Diffstat (limited to 'repositories.bzl')
-rw-r--r-- | repositories.bzl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/repositories.bzl b/repositories.bzl index bddb540a..c1f91962 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -16,6 +16,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") +load("//bazel:local_jdk_libjvm.bzl", "local_jdk_libjvm") def jazzer_dependencies(): maybe( @@ -128,3 +129,8 @@ def jazzer_dependencies(): strip_prefix = "llvm-project-jazzer-b9c07e9c1e75857901808c13101c909104c413a8", url = "https://github.com/CodeIntelligenceTesting/llvm-project-jazzer/archive/b9c07e9c1e75857901808c13101c909104c413a8.tar.gz", ) + + maybe( + local_jdk_libjvm, + name = "jazzer_libjvm", + ) |