Skip to content

Commit

Permalink
generate.py: fix build on 32 bit system
Browse files Browse the repository at this point in the history
setting max-old-space-size to more than 4GB cause node to fail instantly
on 32 bit systems, even to run zap-cli --version.
  • Loading branch information
symphorien committed Dec 28, 2024
1 parent 6c0ba6e commit 290a8f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/tools/zap/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ def main():
if cmdLineArgs.runBootstrap:
subprocess.check_call(getFilePath("scripts/tools/zap/zap_bootstrap.sh"), shell=True)

# The maximum memory usage is over 4GB (#15620)
os.environ["NODE_OPTIONS"] = "--max-old-space-size=8192"
# on 64 bit systems, allow maximum memory usage to go over 4GB (#15620)
if sys.maxsize >= 2**32:
os.environ["NODE_OPTIONS"] = "--max-old-space-size=8192"

# `zap-cli` may extract things into a temporary directory. ensure extraction
# does not conflict.
Expand Down

0 comments on commit 290a8f5

Please sign in to comment.