Tools - mkbuildoptglobals refactoring & attempt to fix caching#9249
Uh oh!
There was an error while loading. Please reload this page.
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.
Optional include for build-dir header to exclude it from core.a when no build opts are created / used. Preventive reads before writes, too
Prefer to use --output-dir in scripts, tests/device must be out-of-tree for caching to work properly (by avoiding changing core nested dirs)
Assume 'aggressive caching' is normal mode of operation, no need for special treatment
(dependencies can be checked by looking at .d files in the build dir)
Even CI uses arduino-cli ~/.cache/arduino/{sketch,core} for building
Allow sketches without globals.h to share core.a, rebuild otherwise (same sketch cache is retained, core.a & .o's reused)
Drop manual logging in favour of 'import logging'. Arduino-CLI might still need tweaks in debug mode, though. Output flushing does not always happen promptly, but using single lines instead of multiple often helps.
Allow multiple entries for the same name, which are then merged.
Allow spaces between @ and the signature words.
Allow to use line right after signature.
Syntax warnings show relevant snippet from globals.h