commit | 9c901001109fb128993b04234d1378bc8b7e9f45 | [log] [tgz] |
---|---|---|
author | Fabian Meumertzheim <fabian@meumertzhe.im> | Thu Oct 24 06:30:13 2024 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Oct 24 06:31:41 2024 -0700 |
tree | 179adced487f67f506c46daa6115cc84cc898876 | |
parent | 02b4dd71b76e23949307004b5c6319afb073b302 [diff] |
Use backslashes in executable paths when remotely executing on Windows `.bat` scripts can only be executed on Windows when their paths use backslashes, not forward slashes. For this reason, local execution carefully replaces forward slashes with backslashes in the executable of a `Spawn` when executing on Windows. This commit adds equivalent logic for the case of remote execution on Windows from any host: * Remote execution replaces forward slashes with backslashes in the first argument when executing on Windows. * Most calls to `PathFragment#getCallablePathString` are replaced with the new execution platform aware `getCallablePathStringForOs`. This affects test actions, in which various wrappers execute different executables (e.g. `--run_under` targets) and thus can have Bazel-controlled executable path strings in locations other than the `argv[0]`. Fixes #11636 Closes #23986. PiperOrigin-RevId: 689357323 Change-Id: Ifb842babc02c6d741d3b45914a5bf5c032204e2b
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md