-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On OpenBSD, search the PATH to find the Bazel executable.
Searching the `PATH` is the only feasible way to find the executable on OpenBSD when `argv[0]` is not an absolute path or a relative path. This change resolves a TODO. This change moves a preexisting `Which` function for searching the `PATH` out of `blaze_util_linux.cc` and into `blaze_util_posix.cc`, so that the Linux code and the BSD code can share this function. In my testing on OpenBSD 6.6-current, a bootstrap build of Bazel succeeds and the resulting `bazel` binary can find itself on the `PATH`. (One caveat: For the bootstrap build to succeed, I had to manually apply the unrelated change in #10639, since it's not merged yet.) This change is part of the OpenBSD port in #10250. @jmmv FYI. Closes #10691. PiperOrigin-RevId: 293183553
- Loading branch information
1 parent
43337bb
commit dd41ff0
Showing
4 changed files
with
34 additions
and
27 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