aboutsummaryrefslogtreecommitdiff
path: root/.bazelrc
diff options
context:
space:
mode:
authorFabian Meumertzheim <fabian@meumertzhe.im>2021-10-16 07:40:59 +0200
committerFabian Meumertzheim <fabian@meumertzhe.im>2021-10-18 22:31:42 +0200
commit9dd7a5e8ccd1e7ac65cc134c1c3773ff26355a21 (patch)
treeb84baf6872649dbd87eca7121c2d65a9c2ce93b4 /.bazelrc
parentcfaf603bdc10b5654c933c5dabd6059715c24930 (diff)
downloadjazzer-api-9dd7a5e8ccd1e7ac65cc134c1c3773ff26355a21.tar.gz
Fix Windows test failures due to missing instrument agent lib
On Windows, since Bazel can't use runfiles trees, the local JDK fails to find its own agent lib 'instrument' when run in an environment that does not include its path in PATH. Disabling --incompatible_strict_action_env for tests is a bit of heavy- handed fix, we should investigate whether a smaller workaround would help.
Diffstat (limited to '.bazelrc')
-rw-r--r--.bazelrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/.bazelrc b/.bazelrc
index 31e43822..349b4e76 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -23,6 +23,11 @@ build --tool_java_language_version=9
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 so that the JDK can find itself when loading the instrument agent lib.
+# FIXME: Debug why this is the case even though sun.boot.library.path is correctly set to
+# external\local_jdk\bin under the Bazel cache.
+test:windows --noincompatible_strict_action_env
+run:windows --noincompatible_strict_action_env
# Toolchain
build:toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-linux,@llvm_toolchain//:cc-toolchain-darwin