forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows: fix java_binary.jvm_flags escaping
Bazel on Windows now correctly forwards java_binary.jvm_flags to the binary. Bazel Bash-tokenizes java_binary.jvm_flags. On Linux/macOS, this is done by embedding the flags into the Java stub script, which is a Bash script, so Bash itself does the tokenization. On Windows, java_binary is launched by a native C++ binary. Therefore nothing could Bash-tokenize the flags until now. From now on, Bazel itself Bash-tokenizes the flags before embedding them in the launcher. The launcher then escapes these flags for CreateProcessW. This PR also adds a new, CreateProcessW-aware escaping method called CreateProcessEscapeArg, to the launcher. The pre-existing GetEscapedArgument escaped only with Bash semantics in mind. This method is now renamed to BashEscapeArg, and used only for the Bash launcher. For the Python and Java launcher, the new CreateProcessEscapeArg method is used. Fixes bazelbuild#7072
- Loading branch information
1 parent
7de30c1
commit eeb697e
Showing
10 changed files
with
287 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.