blob: bdd98cbef021d8373c4060a95c3bedd93c6422ac [file] [log] [blame]
# Allow directories as sources.
startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
build --incompatible_strict_action_env
build --sandbox_tmpfs_path=/tmp
build --enable_platform_specific_config
build -c opt
# C/C++
common --repo_env=CC=clang
# We want stock LLVM to be configured on macOS rather than Xcode's Apple Clang
# toolchain.
common --repo_env=BAZEL_USE_CPP_ONLY_TOOLCHAIN=1
build --incompatible_enable_cc_toolchain_resolution
# Requires a relatively modern clang.
build:ci --features=layering_check
# Java
build --java_language_version=8
build --tool_java_language_version=8
# Windows
# Only compiles with clang on Windows.
build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
build:windows --extra_execution_platforms=//:x64_windows-clang-cl
build:windows --features=static_link_msvcrt
# 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
run:windows --noincompatible_strict_action_env
# macOS
# Workaround for https://github.com/bazelbuild/bazel/issues/13944, which breaks external Java
# dependencies on M1 Macs without Rosetta.
build:macos --extra_toolchains=//:java_non_prebuilt_definition
build:macos --java_runtime_version=11
build:macos --tool_java_runtime_version=11
# Allow Jazzer to find LLVM rather than Apple clang. The former is not
# contained in the default PATH set by Bazel.
test:macos --test_env=PATH
run:macos --test_env=PATH
# Toolchain
# Since the toolchain is conditional on OS and architecture, set it on the particular GitHub Action.
common:toolchain --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Forward debug variables to tests
test --test_env=JAZZER_AUTOFUZZ_DEBUG
test --test_env=JAZZER_REFLECTION_DEBUG
# CI tests (not using the toolchain to test OSS-Fuzz & local compatibility)
test:ci --test_env=JAZZER_CI=1
build:ci --bes_results_url=https://app.buildbuddy.io/invocation/
build:ci --bes_backend=grpcs://remote.buildbuddy.io
build:ci --remote_cache=grpcs://remote.buildbuddy.io
build:ci --remote_timeout=3600
# Maven publishing (local only, requires GPG signature)
build:maven --stamp
build:maven --java_runtime_version=local_jdk_8
# Docker images
common:docker --config=toolchain
common:docker --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
# Generic coverage configuration taken from https://github.com/fmeum/rules_jni
coverage --combined_report=lcov
coverage --experimental_use_llvm_covmap
coverage --experimental_generate_llvm_lcov
coverage --repo_env=CC=clang
coverage --repo_env=BAZEL_USE_LLVM_NATIVE_COVERAGE=1
coverage --repo_env=GCOV=llvm-profdata
# Instrument all source files of non-test targets matching at least one of these regexes.
coverage --instrumentation_filter=^//agent/src/main[:/],^//driver:,^//sanitizers/src/main[:/]
coverage --test_tag_filters=-no-coverage