Hi All,
I'm looking for some guidance on when to use build_settings and when to use platforms/constraint_values/constraint_settings.
I'm working on a C/C++ firmware code base. I'd break my configurations into two groups.
First, hardware configurations. We support a variety of different hardware, where different hardware can mean: microcontrollers with varying architectures, circuit boards with similar microcontrollers but very different devices connected to those microcontrollers, or similar circuit boards and microcontrollers, but have very different purposes.
Second, software configurations. For example, we may have a bootloader and application that are compiled for the same microcontroller. The bootloader we'd like to be as small as possible, so it may want a "lite" version of a cc_library, whereas the application for that microcontroller may want the "full" version of the same cc_library. (i.e.: A logging library that has color printing in the "full" version, put does not support color in the "lite" version).
My current thought is: Hardware configurations should go into platforms. Software configurations should be build_settings.
Questions I'm looking for feedback on:
First, is this the intended split of platforms and build settings? Or would a different split make more sense?
Second, how can I make bazel build //... build everything? I would assume using transitions, but using transitions is a bit clunky, as I need to go and add every build setting I want to change to the transition rule to be able to configure my build properly.
Thank you!
Mark