NightDriverStrip
NightDriverStrip copied to clipboard
Restructure flag inheritance in platformio.
I'm tired of watching huuuuuge lists of files build that I know won't be used. I've not shaved everything to the bone, but I've cut the cases that are big enough to annoy me out of the builds I care about. For example, waiting for it to check out and build that ridiculous olikraus/U8g2 library build up to 37 times on a full build is a drag.
Anything that used to set USE_SCREEN now uses ${use_screen.build_flags} to get -DUSE_SCREEN and ${parent-device.lib_flags} to get the dependencies and the -L ... -l stuff. I similarly tried to tighten up the remote_flags case, upon which this was inspired.
There's still a bit of silliness, such as everything checking out and building BUTTONS when almost none of our builds HAVE buttons...but that lib builds quickly enough to not annoy me. Now checking it out and storing it 38 times isn't awesome.
The way we have configuration split between globals.h and platform.ini is definitely sub-awesome. I wish I could figure out how to make Platformio's extra_script.py to look at the -D flags in CPPFLAGS and then add_libs based on that. Then when globals.h consitionally adds a -DFoo, we could add_libs Foo without it having to appear in globals.h It's pretty silly to wait and checkout and build AsyncTCP or WebServer if the configuration didn't even turn on ENABLE_WIFI, but we do
If your build is broken, it's probably this PR's fault. Buzz me with a repro case for help if needed. Notably, this tightens many environments to use the "correct" hardware lib_deps (which may include extra libraries as it might have been extended) instead of those of base_libs.
Tested: Successful python3 tools/build-all.py
Description
Contributing requirements
- [x] I read the contribution guidelines in CONTRIBUTING.md.
- [x] I understand the BlinkenPerBit metric, and maximized it in this PR.
- [x] I selected
main
as the target branch. - [x] All code herein is subjected to the license terms in COPYING.txt.