1# Copyright 2021 Code Intelligence GmbH 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15"""Contains the external dependencies required to build Jazzer (but not the examples).""" 16 17load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar") 18load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") 19 20def jazzer_dependencies(): 21 maybe( 22 http_archive, 23 name = "platforms", 24 sha256 = "379113459b0feaf6bfbb584a91874c065078aa673222846ac765f86661c27407", 25 urls = [ 26 "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz", 27 "https://github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz", 28 ], 29 ) 30 31 maybe( 32 http_archive, 33 name = "bazel_skylib", 34 sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728", 35 urls = [ 36 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz", 37 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz", 38 ], 39 ) 40 41 maybe( 42 http_archive, 43 name = "io_bazel_rules_kotlin", 44 sha256 = "a57591404423a52bd6b18ebba7979e8cd2243534736c5c94d35c89718ea38f94", 45 url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.6.0/rules_kotlin_release.tgz", 46 ) 47 48 maybe( 49 http_archive, 50 name = "com_google_absl", 51 sha256 = "4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602", 52 strip_prefix = "abseil-cpp-20220623.0", 53 url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.0.tar.gz", 54 ) 55 56 maybe( 57 http_archive, 58 name = "com_github_johnynek_bazel_jar_jar", 59 sha256 = "138a33a5c6ed9355e4411caa22f2fe45460b7e1e4468cbc29f7955367d7a001a", 60 strip_prefix = "bazel_jar_jar-commit-d97cfd22d47cba9a20708fa092f20348b72fb5ed", 61 url = "https://github.com/CodeIntelligenceTesting/bazel_jar_jar/archive/refs/tags/commit-d97cfd22d47cba9a20708fa092f20348b72fb5ed.tar.gz", 62 ) 63 64 maybe( 65 http_archive, 66 name = "com_github_jhalterman_typetools", 67 build_file = Label("//third_party:typetools.BUILD"), 68 sha256 = "4e11a613aebb3c35deef58d5d942e44802da1a6c6ef7f127419261f00a0a082c", 69 strip_prefix = "typetools-commit-887153d2a9adf032fac9f145594d0a0248618d48", 70 url = "https://github.com/CodeIntelligenceTesting/typetools/archive/refs/tags/commit-887153d2a9adf032fac9f145594d0a0248618d48.tar.gz", 71 ) 72 73 maybe( 74 http_archive, 75 build_file = Label("//third_party:classgraph.BUILD"), 76 name = "com_github_classgraph_classgraph", 77 sha256 = "535159d80c163d5b4d025c402b4562c92ed2d6d963db8c6c5255c0eb2c4e9f39", 78 strip_prefix = "classgraph-classgraph-4.8.128", 79 url = "https://github.com/classgraph/classgraph/archive/refs/tags/classgraph-4.8.128.tar.gz", 80 ) 81 82 maybe( 83 http_archive, 84 name = "fmeum_rules_jni", 85 sha256 = "47f0c566ef93fbca2fe94ae8b964d9bf2cb5b31be0efa66e9684b096e54042c1", 86 strip_prefix = "rules_jni-0.5.2", 87 url = "https://github.com/fmeum/rules_jni/archive/refs/tags/v0.5.2.tar.gz", 88 ) 89 90 maybe( 91 http_jar, 92 name = "net_bytebuddy_byte_buddy_agent", 93 sha256 = "25eed4301bbde3724a4bac0e7fe4a0b371c64b5fb40160b29480de3afd04efd5", 94 url = "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.12.13/byte-buddy-agent-1.12.13.jar", 95 ) 96 97 maybe( 98 http_jar, 99 name = "org_ow2_asm_asm", 100 sha256 = "1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc", 101 url = "https://repo1.maven.org/maven2/org/ow2/asm/asm/9.3/asm-9.3.jar", 102 ) 103 104 maybe( 105 http_jar, 106 name = "org_ow2_asm_asm_commons", 107 sha256 = "a347c24732db2aead106b6e5996a015b06a3ef86e790a4f75b61761f0d2f7f39", 108 url = "https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.3/asm-commons-9.3.jar", 109 ) 110 111 maybe( 112 http_jar, 113 name = "org_ow2_asm_asm_tree", 114 sha256 = "ae629c2609f39681ef8d140a42a23800464a94f2d23e36d8f25cd10d5e4caff4", 115 url = "https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.3/asm-tree-9.3.jar", 116 ) 117 118 maybe( 119 http_archive, 120 name = "jazzer_com_github_gflags_gflags", 121 patches = [ 122 Label("//third_party:gflags-use-double-dash-args.patch"), 123 ], 124 sha256 = "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf", 125 strip_prefix = "gflags-2.2.2", 126 url = "https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz", 127 ) 128 129 maybe( 130 http_archive, 131 name = "jazzer_jacoco", 132 build_file = Label("//third_party:jacoco_internal.BUILD"), 133 patches = [ 134 Label("//third_party:jacoco-make-probe-adapter-subclassable.patch"), 135 Label("//third_party:jacoco-make-probe-inserter-subclassable.patch"), 136 ], 137 sha256 = "c603cfcc5f3d95ecda46fb369dc54c82a453bb6b640a605c3970607d10896725", 138 strip_prefix = "jacoco-0.8.8", 139 url = "https://github.com/jacoco/jacoco/archive/refs/tags/v0.8.8.tar.gz", 140 ) 141 142 maybe( 143 http_archive, 144 name = "jazzer_libfuzzer", 145 build_file = Label("//third_party:libFuzzer.BUILD"), 146 sha256 = "3732ff706e5d049dbc76c2078d9e3ad265c6ccbe1b9ed749ae199df0f3118aac", 147 strip_prefix = "llvm-project-jazzer-2022-08-12/compiler-rt/lib/fuzzer", 148 url = "https://github.com/CodeIntelligenceTesting/llvm-project-jazzer/archive/refs/tags/2022-08-12.tar.gz", 149 ) 150