-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tools - mkbuildoptglobals refactoring & attempt to fix caching #9249
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
base: master
Are you sure you want to change the base?
Conversation
Optional include for build-dir header to exclude it from core.a when no build opts are created / used. Preventive reads before writes, too Plus, missing change to makecorever.py doing read before write Prefer to use --output-dir in scripts, tests/device *must* be out-of-tree for caching to work properly (avoid changing core nested dirs) Assume 'aggressive caching' is normal mode of operation, no need for special treatment (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. 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
bump global build options page in the menu hierarchy share pydoc blob as rst instead, reference on the main page note that aggressive caching opts are only for IDE 1.x
Also, ping @mhightower83 Main difference is .d dependency. Previously it was both CommonHFile.h & build-path/SKETCH globals.h. Now, it is either one or both. Sketches without globals.h should build as usual, no dependency means core.a is cached and no core files are depending on a different sketch build path every other build globals.h is also included only when build.opt includes it. Direct dependency on the sketch can be created via I kept previous 'aggressive caching' notes for posterity, since I am not sure how arduino-builder / arduino-cli worked (or did not work) before. Could also just remove it, since none of the notes actually apply to the current version of the script w/ PR - IDE 1.8.19 works fine, so is CLI 1.2.2 (CI runs it) |
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