-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fixing Maximum Memory=-1 issue in emcc.py #12708
base: main
Are you sure you want to change the base?
Conversation
emcc.py
Outdated
@@ -320,7 +320,11 @@ def expand_byte_size_suffixes(value): | |||
value = value.strip() | |||
match = re.match(r'^(\d+)\s*([kmgt]?b)?$', value, re.I) | |||
if not match: | |||
exit_with_error("invalid byte size `%s`. Valid suffixes are: kb, mb, gb, tb" % value) | |||
if value == -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 think value is a string so this won't work.
How about you just to if value == '-1': return -1 adter the
stripand before the the
rs.match`.
Also we should probably add a test
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.
Actually, better still can you at -?
to the beginning of the regular expression and have all negative things "just work"?
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.
So it would start with r'^(-?\d+)\s...
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.
@sbc100 so after adding -? and making it r'^(-?\d+)\s... we shouldn't need the if condition right ?
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.
Yeah, it should just work. You should even be able to do stuff like "-2Kb" and get -2048 out :)
@sbc100 I did the changes to the emcc.py now working on the tests and how to add them and will be referring to the documentation. Thanks :) |
@sbc100 kindly tell me what should I do, I have tried re-installing emsdk tried runner.py on different clone but it is not working, everytime is gives popup error BINARYEN ROOT SET TO EMPTY VALUE. Kindly help and guide me further. Thanks :) |
Is you emsdk active? i.e. did you run |
emsdk activate latest emcc --version :
and this is for where emcc
|
Can you build hello world |
Can you try removing |
and there is no .emscripten in desktop/emscripten |
You need to update to the very latest emsdk. You can do this with |
@sbc100 Thank You so Much , I guess no its working . hello world is working and it is giving some valid output for the tests/runnery.py.
|
@sbc100 Sorry to bother you again about tests. Actually I am unable to get it that how can I add test ?? |
Edit test_other.py and add your test to the end. You can then run it with |
@sbc100 I am not that much experienced in this i am unable to understand what's written in the test_other.py . Is there any documentation that i can refer except test-suite one. |
Not really I'm afraid. The only want to understand the tests right now is basically to look at what they are doing. Most of them will just run the emcc compiler with certain options on certain input files. |
@sbc100 I will try y best to understand the tests and to push the changes in this PR. Thanks :) |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
PR for the issue #12462 . Sorry I mistakenly force pushed the previous PR.