Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ build:windows --extra_execution_platforms=//bazel/platforms:x64_windows-clang-cl
build:windows --features=static_link_msvcrt
build:windows --cxxopt=/std:c++17
build:windows --host_cxxopt=/std:c++17
# TODO: Remove once https://github.com/bazelbuild/rules_kotlin/issues/1309 is addressed.
build:windows --legacy_external_runfiles
# Required as PATH doubles as the shared library search path on Windows and the
# Java agent functionality depends on system-provided shared libraries.
test:windows --noincompatible_strict_action_env
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.6.2
8.4.2
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "rules_kotlin", version = "2.1.9")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_pkg", version = "1.1.0")
bazel_dep(name = "rules_cc", version = "0.2.12")
bazel_dep(name = "toolchains_llvm", version = "1.5.0")

################################################################################
Expand Down Expand Up @@ -432,7 +433,7 @@ llvm.sysroot(
use_repo(llvm, "llvm_toolchain")

# Required by the reference to the Windows toolchain in @local_config_cc from .bazelrc.
cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension")
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc")

# Referenced in BUILD files.
Expand Down
7 changes: 2 additions & 5 deletions deploy/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,18 @@ sh_test(
srcs = [artifact + "_artifact_test.sh"],
args = [
"$(rootpath :%s)" % artifact,
"$(JAVABASE)",
"$(location @bazel_tools//tools/zip:zipper)",
],
data = [
":" + artifact,
"@bazel_tools//tools/jdk:current_java_runtime",
"@bazel_tools//tools/zip:zipper",
],
tags = [
# Coverage instrumentation necessarily adds files to the jar that we
# wouldn't want to release and thus causes this test to fail.
"no-coverage",
],
target_compatible_with = SKIP_ON_WINDOWS,
toolchains = [
"@bazel_tools//tools/jdk:current_java_runtime",
],
)
for artifact in [
"jazzer-api",
Expand Down
9 changes: 5 additions & 4 deletions deploy/jazzer-api_artifact_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# Copyright 2024 Code Intelligence GmbH
#
Expand All @@ -16,12 +16,13 @@
#

[ -f "$1" ] || exit 1
JAR="$2/bin/jar"
[ -e "$JAR" ] || exit 1
ZIPPER="$2"
[[ -x "$ZIPPER" ]] || exit 1

# List all files in the jar and exclude an allowed list of files.
# Since grep fails if there is no match, ! ... | grep ... fails if there is a
# match.
! "$JAR" tf "$1" | \
! "$ZIPPER" v "$1" | awk '{print $3}' | \
grep -v \
-e '^com/$' \
-e '^com/code_intelligence/$' \
Expand Down
9 changes: 5 additions & 4 deletions deploy/jazzer-junit_artifact_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# Copyright 2024 Code Intelligence GmbH
#
Expand All @@ -16,12 +16,13 @@
#

[ -f "$1" ] || exit 1
JAR="$2/bin/jar"
[ -e "$JAR" ] || exit 1
ZIPPER="$2"
[[ -x "$ZIPPER" ]] || exit 1

# List all files in the jar and exclude an allowed list of files.
# Since grep fails if there is no match, ! ... | grep ... fails if there is a
# match.
! "$JAR" tf "$1" | \
! "$ZIPPER" v "$1" | awk '{print $3}' | \
grep -v \
-e '^com/$' \
-e '^com/code_intelligence/$' \
Expand Down
9 changes: 5 additions & 4 deletions deploy/jazzer_artifact_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# Copyright 2024 Code Intelligence GmbH
#
Expand All @@ -16,12 +16,13 @@
#

[ -f "$1" ] || exit 1
JAR="$2/bin/jar"
[ -e "$JAR" ] || exit 1
ZIPPER="$2"
[[ -x "$ZIPPER" ]] || exit 1

# List all files in the jar and exclude an allowed list of files.
# Since grep fails if there is no match, ! ... | grep ... fails if there is a
# match.
! "$JAR" tf "$1" | \
! "$ZIPPER" v "$1" | awk '{print $3}' | \
grep -v \
-e '^com/$' \
-e '^com/code_intelligence/$' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,18 @@ sh_test(
srcs = ["verify_shading.sh"],
args = [
"$(rootpath jazzer_bootstrap.jar)",
"$(JAVABASE)",
"$(location @bazel_tools//tools/zip:zipper)",
],
data = [
"jazzer_bootstrap.jar",
"@bazel_tools//tools/jdk:current_java_runtime",
"@bazel_tools//tools/zip:zipper",
],
tags = [
# Coverage instrumentation necessarily adds files to the jar that we
# wouldn't want to release and thus causes this test to fail.
"no-coverage",
],
target_compatible_with = SKIP_ON_WINDOWS,
toolchains = [
"@bazel_tools//tools/jdk:current_java_runtime",
],
)

# At runtime, the AgentInstaller appends jazzer_bootstrap.jar to the bootstrap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
#
# Copyright 2024 Code Intelligence GmbH
#
Expand All @@ -16,12 +16,13 @@
#

[ -f "$1" ] || exit 1
JAR="$2/bin/jar"
[ -e "$JAR" ] || exit 1
ZIPPER="$2"
[[ -x "$ZIPPER" ]] || exit 1

# List all files in the jar and exclude an allowed list of files.
# Since grep fails if there is no match, ! ... | grep ... fails if there is a
# match.
! "$JAR" tf "$1" | \
! "$ZIPPER" v "$1" | awk '{print $3}' | \
grep -v \
-e '^com/$' \
-e '^com/code_intelligence/$' \
Expand Down