Conversation
Configure MTD and SPI transports with target_compatible_with and Bazel config_setting rules matching the D-Bus backend pattern, enabled by default on Linux via .bazelrc. Signed-off-by: Michael Field <michaelfield@google.com>
Configure libusb for Darwin, use POSIX getentropy() for DFU nonce generation, and set minimum macOS version in .bazelrc. Signed-off-by: Michael Field <michaelfield@google.com>
Add build-macos GitHub Actions job to build and run Bazel tests on macOS. Signed-off-by: Michael Field <michaelfield@google.com>
mfield4
force-pushed
the
macos-build
branch
from
September 25, 2026 22:43
dec18d2 to
7badaa6
Compare
mfield4
marked this pull request as ready for review
September 25, 2026 22:46
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This lets
htoolbuild and run on macOS with Bazel, using the USB transport. It also adds a macOS job to CI. Linux only transports are not ported, and choosing one on mac exits with a printed warning and a non-zero exit code.Tested on real hardware from an Apple Silicon Mac:
Known limitations / follow-ups
-Werroron macOS yet. Format strings like%lxforuint64_t/libhoth_errorwarn on macOS, where those areunsigned long long. Switching toPRIx64would fix it. libusb's upstreamdarwin_usb.calso has unused-variable warnings.fully_static_link_targetfeature onhtoolhas no effect on macOS. macOS doesn't support fully static binaries, so the result links against system libraries and frameworks dynamically.ld: warning: ignoring duplicate libraries: '-lobjc'. It's harmless, because the macOS toolchain already linkslibobjc.