Skip to content

Commit bd83d0b

Browse files
committed
Fixing Maximum Memory=-1 issue in emcc.py
1 parent cc8a324 commit bd83d0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

emcc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,11 @@ def expand_byte_size_suffixes(value):
320320
value = value.strip()
321321
match = re.match(r'^(\d+)\s*([kmgt]?b)?$', value, re.I)
322322
if not match:
323-
exit_with_error("invalid byte size `%s`. Valid suffixes are: kb, mb, gb, tb" % value)
323+
if value == -1:
324+
# -1 means "no limit", which we don't need to parse
325+
pass # do nothing
326+
else:
327+
exit_with_error("invalid byte size `%s`. Valid suffixes are: kb, mb, gb, tb" % value)
324328
value, suffix = match.groups()
325329
value = int(value)
326330
if suffix:

0 commit comments

Comments
 (0)