1workspace(name = "jazzer") 2 3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file", "http_jar") 4load("//:repositories.bzl", "jazzer_dependencies") 5 6jazzer_dependencies(android = True) 7 8load("//:init.bzl", "jazzer_init") 9 10jazzer_init() 11 12http_archive( 13 name = "com_google_protobuf", 14 patches = ["//third_party:protobuf-disable-layering_check.patch"], 15 sha256 = "ddf8c9c1ffccb7e80afd183b3bd32b3b62f7cc54b106be190bf49f2bc09daab5", 16 strip_prefix = "protobuf-23.2", 17 # Keep in sync with com_google_protobuf_protobuf_java in repositories.bzl. 18 urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.2/protobuf-23.2.tar.gz"], 19) 20 21http_archive( 22 name = "org_chromium_sysroot_linux_x64", 23 build_file_content = """ 24filegroup( 25 name = "sysroot", 26 srcs = glob(["*/**"]), 27 visibility = ["//visibility:public"], 28) 29""", 30 sha256 = "84656a6df544ecef62169cfe3ab6e41bb4346a62d3ba2a045dc5a0a2ecea94a3", 31 urls = ["https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2202c161310ffde63729f29d27fe7bb24a0bc540/debian_stretch_amd64_sysroot.tar.xz"], 32) 33 34http_archive( 35 name = "com_grail_bazel_toolchain", 36 sha256 = "da607faed78c4cb5a5637ef74a36fdd2286f85ca5192222c4664efec2d529bb8", 37 strip_prefix = "bazel-toolchain-0.6.3", 38 urls = ["https://github.com/grailbio/bazel-toolchain/archive/refs/tags/0.6.3.tar.gz"], 39) 40 41http_archive( 42 name = "googletest", 43 sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2", 44 strip_prefix = "googletest-release-1.12.1", 45 url = "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz", 46) 47 48http_archive( 49 name = "rules_foreign_cc", 50 sha256 = "6041f1374ff32ba711564374ad8e007aef77f71561a7ce784123b9b4b88614fc", 51 strip_prefix = "rules_foreign_cc-0.8.0", 52 url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.8.0.tar.gz", 53) 54 55http_archive( 56 name = "rules_jvm_external", 57 sha256 = "6ebe13d95fc5549cc32b27d41c907426b16464c5aae893a163c7fe0c9051ec1d", 58 # TODO: Return to the next release. 59 strip_prefix = "rules_jvm_external-90280783fa4e74439b88191acafd99232ada61aa", 60 url = "https://github.com/bazelbuild/rules_jvm_external/archive/90280783fa4e74439b88191acafd99232ada61aa.tar.gz", 61) 62 63http_archive( 64 name = "libjpeg_turbo", 65 build_file = "//third_party:libjpeg_turbo.BUILD", 66 sha256 = "6a965adb02ad898b2ae48214244618fe342baea79db97157fdc70d8844ac6f09", 67 strip_prefix = "libjpeg-turbo-2.0.90", 68 url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.90.tar.gz", 69) 70 71http_archive( 72 name = "rules_pkg", 73 sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2", 74 urls = [ 75 "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", 76 "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", 77 ], 78) 79 80http_archive( 81 name = "contrib_rules_jvm", 82 # TODO: Return to the next release. 83 sha256 = "57dfe16edee7b6df7fcc2b92551aab233e9c802a7aba420e5302b99f3eccbbc3", 84 strip_prefix = "rules_jvm-80780e1b1d9cc041b843acc3155a2828a57d5807", 85 url = "https://github.com/bazel-contrib/rules_jvm/archive/80780e1b1d9cc041b843acc3155a2828a57d5807.tar.gz", 86) 87 88http_archive( 89 name = "build_bazel_rules_android", 90 sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", 91 strip_prefix = "rules_android-0.1.1", 92 urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], 93) 94 95http_archive( 96 name = "rules_android_ndk", 97 sha256 = "0fcaeed391bfc0ee784ab0365312e6c59fe75db9df3a67e8708c606e2a9cfd90", 98 strip_prefix = "rules_android_ndk-79923720aef601fad89c94e8802f5d77c1b73c5d", 99 url = "https://github.com/bazelbuild/rules_android_ndk/archive/79923720aef601fad89c94e8802f5d77c1b73c5d.zip", 100) 101 102http_file( 103 name = "genhtml", 104 downloaded_file_path = "genhtml", 105 executable = True, 106 sha256 = "4120cc9186a0687db218520a2d0dc9bae75d15faf41d87448b6b6c5140c19156", 107 urls = ["https://raw.githubusercontent.com/linux-test-project/lcov/6da8399c7a7a3370de2c69b16b092e945442ffcd/bin/genhtml"], 108) 109 110http_file( 111 name = "jacocoagent", 112 downloaded_file_path = "jacocoagent.jar", 113 sha256 = "191734a0b7ef97606e6a09ae584c4acab47eb30fcb4c555d3d440d4e0d71d73d", 114 urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.9/org.jacoco.agent-0.8.9-runtime.jar"], 115) 116 117http_file( 118 name = "jacococli", 119 downloaded_file_path = "jacococli.jar", 120 sha256 = "29c7754338512599f742ebfedd095c9c93800fefbce407500eceb16f0ed5a20d", 121 urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.cli/0.8.9/org.jacoco.cli-0.8.9-nodeps.jar"], 122) 123 124load("@contrib_rules_jvm//:repositories.bzl", "contrib_rules_jvm_deps") 125 126contrib_rules_jvm_deps() 127 128load("@contrib_rules_jvm//:setup.bzl", "contrib_rules_jvm_setup") 129 130contrib_rules_jvm_setup() 131 132load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") 133 134bazel_toolchain_dependencies() 135 136load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain") 137 138llvm_toolchain( 139 name = "llvm_toolchain", 140 llvm_version = "13.0.0", 141 sysroot = { 142 "linux-x86_64": "@org_chromium_sysroot_linux_x64//:sysroot", 143 }, 144) 145 146load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") 147 148rules_jvm_external_deps() 149 150load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") 151 152rules_jvm_external_setup() 153 154load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") 155 156rules_foreign_cc_dependencies() 157 158load("@rules_jvm_external//:defs.bzl", "maven_install") 159load("//:maven.bzl", "MAVEN_ARTIFACTS") 160 161maven_install( 162 artifacts = MAVEN_ARTIFACTS, 163 fail_if_repin_required = True, 164 maven_install_json = "//:maven_install.json", 165 override_targets = { 166 "org.jetbrains.kotlin:kotlin-reflect": "@com_github_jetbrains_kotlin//:kotlin-reflect", 167 "org.jetbrains.kotlin:kotlin-stdlib": "@com_github_jetbrains_kotlin//:kotlin-stdlib", 168 "com.google.errorprone:error_prone_annotations": "@com_google_errorprone_error_prone_annotations//jar", 169 }, 170 repositories = [ 171 "https://repo1.maven.org/maven2", 172 ], 173 strict_visibility = True, 174) 175 176load("@maven//:defs.bzl", "pinned_maven_install") 177 178pinned_maven_install() 179 180load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") 181 182rules_pkg_dependencies() 183 184load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") 185 186protobuf_deps() 187 188http_file( 189 name = "jacocoagent", 190 downloaded_file_path = "jacocoagent.jar", 191 sha256 = "67de51e9ca1db044f3a3d10613518befb02e8eee1015f2ff6d56cfb9d4506546", 192 urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.8/org.jacoco.agent-0.8.8-runtime.jar"], 193) 194 195http_file( 196 name = "jacococli", 197 downloaded_file_path = "jacococli.jar", 198 sha256 = "c449591174982bbc003d1290003fcbc7b939215436922d2f0f25239d110d531a", 199 urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.cli/0.8.8/org.jacoco.cli-0.8.8-nodeps.jar"], 200) 201 202load("//third_party/android:android_configure.bzl", "android_configure") 203 204android_configure(name = "configure_android_rules") 205 206load("@configure_android_rules//:android_configure.bzl", "android_workspace") 207 208android_workspace() 209 210http_archive( 211 name = "buildifier_prebuilt", 212 sha256 = "7015c623143084bbdb3d2bb955087deb7cbb8e4806df457f3340d64b6eda876e", 213 strip_prefix = "buildifier-prebuilt-5b6adef925e98f90305d69de6d7ad70dd512c4ee", 214 urls = [ 215 "https://github.com/keith/buildifier-prebuilt/archive/5b6adef925e98f90305d69de6d7ad70dd512c4ee.tar.gz", 216 ], 217) 218 219load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") 220 221buildifier_prebuilt_deps() 222 223load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") 224 225bazel_skylib_workspace() 226 227load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains") 228 229buildifier_prebuilt_register_toolchains() 230 231http_file( 232 name = "clang-format-15-darwin-x64", 233 downloaded_file_path = "clang-format", 234 executable = True, 235 sha256 = "97116f64d97fb2870b4aa29758bba8fb0fe7f3b1ed8a4bc12faa927ecfdec196", 236 urls = [ 237 "https://github.com/angular/clang-format/raw/master/bin/darwin_x64/clang-format", 238 ], 239) 240 241http_file( 242 name = "clang-format-15-linux-x64", 243 downloaded_file_path = "clang-format", 244 executable = True, 245 sha256 = "050c600256e225eabe9608d28f492fe8673c6e7f5deac59c6da973223c764d6c", 246 urls = [ 247 "https://github.com/angular/clang-format/raw/master/bin/linux_x64/clang-format", 248 ], 249) 250 251http_file( 252 name = "addlicense-darwin-universal", 253 downloaded_file_path = "addlicense", 254 executable = True, 255 sha256 = "9c08964e15d6ed0568c4e8a5f861bcc2122498419586fbe87e08add56d18762d", 256 urls = [ 257 "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-darwin-universal", 258 ], 259) 260 261http_file( 262 name = "addlicense-linux-amd64", 263 downloaded_file_path = "addlicense", 264 executable = True, 265 sha256 = "521e680ff085f511d760aa139a0e869238ab4c936e89d258ac3432147d9e8be9", 266 urls = [ 267 "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-linux-amd64", 268 ], 269) 270 271http_archive( 272 name = "libprotobuf-mutator", 273 build_file_content = """ 274cc_library( 275 name = "libprotobuf-mutator", 276 srcs = glob([ 277 "src/*.cc", 278 "src/*.h", 279 "src/libfuzzer/*.cc", 280 "src/libfuzzer/*.h", 281 "port/protobuf.h", 282 ], exclude = [ 283 "**/*_test.cc", 284 ]), 285 hdrs = ["src/libfuzzer/libfuzzer_macro.h"], 286 deps = ["@com_google_protobuf//:protobuf"], 287 visibility = ["//visibility:public"], 288) 289""", 290 sha256 = "21bfdfef25554fa2e30aec2a9f9b58f4a17c1d8c8593763fa94a6dd74b226594", 291 strip_prefix = "libprotobuf-mutator-3b28530531b154a748fe9884bc9219b4966f0754", 292 urls = ["https://github.com/google/libprotobuf-mutator/archive/3b28530531b154a748fe9884bc9219b4966f0754.tar.gz"], 293) 294 295http_file( 296 name = "android_jvmti", 297 downloaded_file_path = "jvmti.encoded", 298 sha256 = "95bd6fb4f296ff1c49b893c1d3a665de3c2b1beaa3cc8fc570dea992202daa35", 299 url = "https://android.googlesource.com/platform/art/+/1cff8449bac0fdab6e84dc9255c3cccd504c1705/openjdkjvmti/include/jvmti.h?format=TEXT", 300) 301