Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Tweak third_party/BUILD for OpenBSD. #10639
This change was part of #10567, which was merged as commit d6145a0, but somehow that commit contains all of the changes in the PR except the changes to
This change is part of the OpenBSD port in #10250.
Searching the `PATH` is the only feasible way to find the executable on OpenBSD when `argv` 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