diff options
Diffstat (limited to 'WORKSPACE.bazel')
-rw-r--r-- | WORKSPACE.bazel | 210 |
1 files changed, 192 insertions, 18 deletions
diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 5589d57c..ae28bfc4 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -3,13 +3,22 @@ workspace(name = "jazzer") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file", "http_jar") load("//:repositories.bzl", "jazzer_dependencies") -jazzer_dependencies() +jazzer_dependencies(android = True) load("//:init.bzl", "jazzer_init") jazzer_init() http_archive( + name = "com_google_protobuf", + patches = ["//third_party:protobuf-disable-layering_check.patch"], + sha256 = "ddf8c9c1ffccb7e80afd183b3bd32b3b62f7cc54b106be190bf49f2bc09daab5", + strip_prefix = "protobuf-23.2", + # Keep in sync with com_google_protobuf_protobuf_java in repositories.bzl. + urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.2/protobuf-23.2.tar.gz"], +) + +http_archive( name = "org_chromium_sysroot_linux_x64", build_file_content = """ filegroup( @@ -24,12 +33,6 @@ filegroup( http_archive( name = "com_grail_bazel_toolchain", - patches = [ - # There is no static runtime library for ASan on macOS, so when using - # the toolchain in the CI, we have to explicitly depend on the dylib and - # add it to the runfiles for clang/ld. - "//third_party:bazel-toolchain-export-dynamic-macos-asan.patch", - ], sha256 = "da607faed78c4cb5a5637ef74a36fdd2286f85ca5192222c4664efec2d529bb8", strip_prefix = "bazel-toolchain-0.6.3", urls = ["https://github.com/grailbio/bazel-toolchain/archive/refs/tags/0.6.3.tar.gz"], @@ -51,9 +54,10 @@ http_archive( http_archive( name = "rules_jvm_external", - sha256 = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca", - strip_prefix = "rules_jvm_external-4.2", - url = "https://github.com/bazelbuild/rules_jvm_external/archive/refs/tags/4.2.zip", + sha256 = "6ebe13d95fc5549cc32b27d41c907426b16464c5aae893a163c7fe0c9051ec1d", + # TODO: Return to the next release. + strip_prefix = "rules_jvm_external-90280783fa4e74439b88191acafd99232ada61aa", + url = "https://github.com/bazelbuild/rules_jvm_external/archive/90280783fa4e74439b88191acafd99232ada61aa.tar.gz", ) http_archive( @@ -64,12 +68,67 @@ http_archive( url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.90.tar.gz", ) -http_jar( - name = "org_kohsuke_args4j_args4j", - sha256 = "91ddeaba0b24adce72291c618c00bbdce1c884755f6c4dba9c5c46e871c69ed6", - url = "https://repo1.maven.org/maven2/args4j/args4j/2.33/args4j-2.33.jar", +http_archive( + name = "rules_pkg", + sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", + ], +) + +http_archive( + name = "contrib_rules_jvm", + # TODO: Return to the next release. + sha256 = "57dfe16edee7b6df7fcc2b92551aab233e9c802a7aba420e5302b99f3eccbbc3", + strip_prefix = "rules_jvm-80780e1b1d9cc041b843acc3155a2828a57d5807", + url = "https://github.com/bazel-contrib/rules_jvm/archive/80780e1b1d9cc041b843acc3155a2828a57d5807.tar.gz", +) + +http_archive( + name = "build_bazel_rules_android", + sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", + strip_prefix = "rules_android-0.1.1", + urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], +) + +http_archive( + name = "rules_android_ndk", + sha256 = "0fcaeed391bfc0ee784ab0365312e6c59fe75db9df3a67e8708c606e2a9cfd90", + strip_prefix = "rules_android_ndk-79923720aef601fad89c94e8802f5d77c1b73c5d", + url = "https://github.com/bazelbuild/rules_android_ndk/archive/79923720aef601fad89c94e8802f5d77c1b73c5d.zip", ) +http_file( + name = "genhtml", + downloaded_file_path = "genhtml", + executable = True, + sha256 = "4120cc9186a0687db218520a2d0dc9bae75d15faf41d87448b6b6c5140c19156", + urls = ["https://raw.githubusercontent.com/linux-test-project/lcov/6da8399c7a7a3370de2c69b16b092e945442ffcd/bin/genhtml"], +) + +http_file( + name = "jacocoagent", + downloaded_file_path = "jacocoagent.jar", + sha256 = "191734a0b7ef97606e6a09ae584c4acab47eb30fcb4c555d3d440d4e0d71d73d", + urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.9/org.jacoco.agent-0.8.9-runtime.jar"], +) + +http_file( + name = "jacococli", + downloaded_file_path = "jacococli.jar", + sha256 = "29c7754338512599f742ebfedd095c9c93800fefbce407500eceb16f0ed5a20d", + urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.cli/0.8.9/org.jacoco.cli-0.8.9-nodeps.jar"], +) + +load("@contrib_rules_jvm//:repositories.bzl", "contrib_rules_jvm_deps") + +contrib_rules_jvm_deps() + +load("@contrib_rules_jvm//:setup.bzl", "contrib_rules_jvm_setup") + +contrib_rules_jvm_setup() + load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") bazel_toolchain_dependencies() @@ -106,6 +165,7 @@ maven_install( override_targets = { "org.jetbrains.kotlin:kotlin-reflect": "@com_github_jetbrains_kotlin//:kotlin-reflect", "org.jetbrains.kotlin:kotlin-stdlib": "@com_github_jetbrains_kotlin//:kotlin-stdlib", + "com.google.errorprone:error_prone_annotations": "@com_google_errorprone_error_prone_annotations//jar", }, repositories = [ "https://repo1.maven.org/maven2", @@ -117,10 +177,124 @@ load("@maven//:defs.bzl", "pinned_maven_install") pinned_maven_install() +load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") + +rules_pkg_dependencies() + +load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") + +protobuf_deps() + http_file( - name = "genhtml", - downloaded_file_path = "genhtml", + name = "jacocoagent", + downloaded_file_path = "jacocoagent.jar", + sha256 = "67de51e9ca1db044f3a3d10613518befb02e8eee1015f2ff6d56cfb9d4506546", + urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.8/org.jacoco.agent-0.8.8-runtime.jar"], +) + +http_file( + name = "jacococli", + downloaded_file_path = "jacococli.jar", + sha256 = "c449591174982bbc003d1290003fcbc7b939215436922d2f0f25239d110d531a", + urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.cli/0.8.8/org.jacoco.cli-0.8.8-nodeps.jar"], +) + +load("//third_party/android:android_configure.bzl", "android_configure") + +android_configure(name = "configure_android_rules") + +load("@configure_android_rules//:android_configure.bzl", "android_workspace") + +android_workspace() + +http_archive( + name = "buildifier_prebuilt", + sha256 = "7015c623143084bbdb3d2bb955087deb7cbb8e4806df457f3340d64b6eda876e", + strip_prefix = "buildifier-prebuilt-5b6adef925e98f90305d69de6d7ad70dd512c4ee", + urls = [ + "https://github.com/keith/buildifier-prebuilt/archive/5b6adef925e98f90305d69de6d7ad70dd512c4ee.tar.gz", + ], +) + +load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") + +buildifier_prebuilt_deps() + +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") + +bazel_skylib_workspace() + +load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains") + +buildifier_prebuilt_register_toolchains() + +http_file( + name = "clang-format-15-darwin-x64", + downloaded_file_path = "clang-format", executable = True, - sha256 = "4120cc9186a0687db218520a2d0dc9bae75d15faf41d87448b6b6c5140c19156", - urls = ["https://raw.githubusercontent.com/linux-test-project/lcov/6da8399c7a7a3370de2c69b16b092e945442ffcd/bin/genhtml"], + sha256 = "97116f64d97fb2870b4aa29758bba8fb0fe7f3b1ed8a4bc12faa927ecfdec196", + urls = [ + "https://github.com/angular/clang-format/raw/master/bin/darwin_x64/clang-format", + ], +) + +http_file( + name = "clang-format-15-linux-x64", + downloaded_file_path = "clang-format", + executable = True, + sha256 = "050c600256e225eabe9608d28f492fe8673c6e7f5deac59c6da973223c764d6c", + urls = [ + "https://github.com/angular/clang-format/raw/master/bin/linux_x64/clang-format", + ], +) + +http_file( + name = "addlicense-darwin-universal", + downloaded_file_path = "addlicense", + executable = True, + sha256 = "9c08964e15d6ed0568c4e8a5f861bcc2122498419586fbe87e08add56d18762d", + urls = [ + "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-darwin-universal", + ], +) + +http_file( + name = "addlicense-linux-amd64", + downloaded_file_path = "addlicense", + executable = True, + sha256 = "521e680ff085f511d760aa139a0e869238ab4c936e89d258ac3432147d9e8be9", + urls = [ + "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-linux-amd64", + ], +) + +http_archive( + name = "libprotobuf-mutator", + build_file_content = """ +cc_library( + name = "libprotobuf-mutator", + srcs = glob([ + "src/*.cc", + "src/*.h", + "src/libfuzzer/*.cc", + "src/libfuzzer/*.h", + "port/protobuf.h", + ], exclude = [ + "**/*_test.cc", + ]), + hdrs = ["src/libfuzzer/libfuzzer_macro.h"], + deps = ["@com_google_protobuf//:protobuf"], + visibility = ["//visibility:public"], +) +""", + sha256 = "21bfdfef25554fa2e30aec2a9f9b58f4a17c1d8c8593763fa94a6dd74b226594", + strip_prefix = "libprotobuf-mutator-3b28530531b154a748fe9884bc9219b4966f0754", + urls = ["https://github.com/google/libprotobuf-mutator/archive/3b28530531b154a748fe9884bc9219b4966f0754.tar.gz"], +) + +http_file( + name = "android_jvmti", + downloaded_file_path = "jvmti.encoded", + sha256 = "95bd6fb4f296ff1c49b893c1d3a665de3c2b1beaa3cc8fc570dea992202daa35", + url = "https://android.googlesource.com/platform/art/+/1cff8449bac0fdab6e84dc9255c3cccd504c1705/openjdkjvmti/include/jvmti.h?format=TEXT", ) |