-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
tools/makemanifest.py: Allow passing flags to mpy-tool.py #5412
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
Conversation
ports/unix/Makefile
Outdated
@@ -178,7 +178,9 @@ ifneq ($(FROZEN_MANIFEST)$(FROZEN_MPY_DIR),) | |||
# freeze, then invoke make with FROZEN_MANIFEST=manifest.py (be sure to build from scratch). | |||
CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool | |||
CFLAGS += -DMICROPY_MODULE_FROZEN_MPY | |||
CFLAGS += -DMPZ_DIG_SIZE=16 # force 16 bits to work on both 32 and 64 bit archs | |||
ifneq ($(MICROPY_FORCE_32BIT),1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this will catch all build scenarios: eg what about building on a 32-bit machine? Then this config option may not be set but the dig size should still be 16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, you're right. I'll think of another way, perhaps to check the compiler version.
Without this change, since mpy-tool assumes MPZ_DIG_SIZE=16, you must define MPZ_DIG_SIZE=16 in your CFLAGS/port to have it compile. It better be automatic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you rebase this PR on to latest master that will include a new Travis build for 32-bit unix, which can test this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just remove this change.
I wonder if it's required, after all - I mean, I added this because my first idea was to change mpy-tool to use digit size = 32, instead of forcing the Linux kernel port to use digit size = 16. If we think it doesn't have any considerable performance impact, we might as well:
This is, apparently, not so easy as I thought. I think what most I think we can keep the mpy-tool addition, but remove the change in the unix port. |
Sigh, github hotkeys. |
@Jongy can you please rebase on latest master so it runs the CI (there are a lot of new tests now). Then I can comment on the above. |
This is erroring on qemu_mips and qeum_arm builds with:
|
tools/makemanifest.py
Outdated
@@ -248,6 +248,7 @@ def main(): | |||
"-f", "--mpy-cross-flags", default="", help="flags to pass to mpy-cross" | |||
) | |||
cmd_parser.add_argument("-v", "--var", action="append", help="variables to substitute") | |||
cmd_parser.add_argument('--mpy-tool-flags', default='', help='flags to pass to mpy-tool') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use double quotes "
(to satisfy Black formatting)
Agreed. |
@dpgeorge , I have:
and fixed other CI notes |
Codecov Report
@@ Coverage Diff @@
## master #5412 +/- ##
==========================================
- Coverage 98.29% 98.28% -0.02%
==========================================
Files 154 154
Lines 19986 19985 -1
==========================================
- Hits 19646 19643 -3
- Misses 340 342 +2
Continue to review full report at Codecov.
|
Thank you! |
Use it to remain with the default MPZ_DIG_SIZE = 32 on 64-bit builds.