Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
incompatible_windows_escape_jvm_flags: on Windows, enables tokenization and escaping of jvm_flags #7486
Add --incompatible_windows_escape_jvm_flags flag (default: false). This flag only affects builds on Windows.
This flag has no effect on Linux/macOS/non-Windows.
When you build a java_binary or java_test on Windows, one of the outputs is an .exe file. This is called the launcher, and this is what you run with "bazel run" and "bazel test". The launcher's purpose is to set up the environment, compute the JVM command line (classpath, JVM flags, etc.) and launch the JVM.
The target-specific data (such as the classpath, main class name, but also the
The new flag
The --incompatible_windows_escape_jvm_flags flag affects how Bazel builds the launcher:
When the flag is enabled:
When the flag is disabled:
Related bug: #7072
The expected output of running the binary is:
Currently the output is something like:
None, as of 2019-02-21.
We don't expect any breakages when this flag is enabled. However if it breaks your build or if it breaks your java_binaries or java_tests, please let us know so we can help fixing it and provide a migration recipe.