-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add C++ toolchain configuration for OpenBSD. #10436
Add C++ toolchain configuration for OpenBSD. #10436
Conversation
In my limited testing, these changes appear to work. When I built Bazel on OpenBSD incorporating these changes, the resulting `bazel` binary could build C++ libraries and binaries. I am unfamiliar with these files. This PR basically mimics what was done previously for FreeBSD. `openbsd_cc_toolchain_config.bzl` was created as follows: ``` cp freebsd_cc_toolchain_config.bzl openbsd_cc_toolchain_config.bzl sed -i -e 's/freebsd/openbsd/g' openbsd_cc_toolchain_config.bzl sed -i -e 's#/bin/false#/usr/bin/false#g' openbsd_cc_toolchain_config.bzl sed -i -e 's#/usr/bin/dwp#/usr/bin/false#g' openbsd_cc_toolchain_config.bzl ``` `BUILD.static.openbsd` was created as follows: ``` cp BUILD.static.freebsd BUILD.static.openbsd sed -i -e 's/Copyright 2018/Copyright 2019/' BUILD.static.openbsd sed -i -e 's/FreeBSD/OpenBSD/g' BUILD.static.openbsd sed -i -e 's/freebsd/openbsd/g' BUILD.static.openbsd ```
cc @jmmv, who may know something about BSD here :) |
I believe this works based on the description and what I see in the diff. If the new OpenBSD-specific file was generated with a simple copy+find/replace, and given that both the old and new file are Starlark... could we generalize them instead? Similar to what we did with a single file for all BSDs in the C++ client code. |
Done. PTAL. |
In my limited testing, these changes appear to work. When I built Bazel on OpenBSD incorporating these changes, the resulting
bazel
binary could build C++ libraries and binaries. Likewise on FreeBSD.This change, split out of the larger PR #10274, is part of the OpenBSD port in #10250.