8000 py/mkrules: Automatically build mpy-cross if it doesn't exist. by dpgeorge · Pull Request #7610 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

py/mkrules: Automatically build mpy-cross if it doesn't exist. #7610

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

Merged
merged 1 commit into from
Aug 7, 2021

Conversation

dpgeorge
Copy link
Member
@dpgeorge dpgeorge commented Aug 3, 2021

Commit 4173950 removed automatic building
of mpy-cross, which rebuilt it whenever any of its dependent source files
changed.

But needing to build mpy-cross, and not knowing how, is a frequent issue.
This commit aims to help by automatically building mpy-cross only if it
doesn't exist. For Makefiles it uses an order-only prerequisite, while
for CMake it uses a custom command.

If MICROPY_MPYCROSS (which is what makemanifest.py uses to locate the
mpy-cross executable) is defined in the environment then automatic build
will not be attempted, allowing a way to prevent this auto-build if needed.

Thanks to Trammell Hudson aka @osresearch for the original idea; see #5760.

@codecov-commenter
Copy link
codecov-commenter commented Aug 3, 2021

Codecov Report

Merging #7610 (78718ff) into master (d290f36) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7610      +/-   ##
==========================================
- Coverage   98.30%   98.28%   -0.02%     
==========================================
  Files         154      154              
  Lines       20014    20014              
==========================================
- Hits        19674    19671       -3     
- Misses        340      343       +3     
Impacted Files Coverage Δ
py/bc.c 88.65% <0.00%> (-1.04%) ⬇️
py/obj.c 96.82% <0.00%> (-0.80%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d290f36...78718ff. Read the comment docs.

Commit 4173950 removed automatic building
of mpy-cross, which rebuilt it whenever any of its dependent source files
changed.

But needing to build mpy-cross, and not knowing how, is a frequent issue.
This commit aims to help by automatically building mpy-cross only if it
doesn't exist.  For Makefiles it uses an order-only prerequisite, while
for CMake it uses a custom command.

If MICROPY_MPYCROSS (which is what makemanifest.py uses to locate the
mpy-cross executable) is defined in the environment then automatic build
will not be attempted, allowing a way to prevent this auto-build if needed.

Thanks to Trammell Hudson aka @osresearch for the original idea; see micropython#5760.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge force-pushed the mpy-cross-auto-build branch from 1732a9f to 78718ff Compare August 7, 2021 10:26
@dpgeorge dpgeorge merged commit 78718ff into micropython:master Aug 7, 2021
@dpgeorge dpgeorge deleted the mpy-cross-auto-build branch August 7, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0