Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bin/compile.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,13 @@ function run(string $filename, string $code, array $options): void
fwrite(STDERR, 'phpc lint: OK (bundle cache hit '.basename($bundleLintCacheFile).", #16508)\n");
exit(0);
}
// The mega-bundle compile needs ~2-4G; the 1536M default OOMs (#16508).
}

// Self-host bundles need ~2-4G whether we are LINTING or COMPILING them; the
// 1536M default OOMs deep inside php-cfg Traverser with no hint that the cap is
// the cause (#16508). The bump used to sit inside the `-l` branch above, so
// `bin/compile.php -o OUT test/selfhost/.../main.php` still died at 1536M.
if ('' !== $normalized && str_contains($normalized, 'test/selfhost/')) {
$bundleLimit = getenv('PHP_COMPILER_MEMORY_LIMIT');
if (false === $bundleLimit || '' === $bundleLimit || '1536M' === $bundleLimit || '2G' === $bundleLimit) {
ini_set('memory_limit', '6G');
Expand Down
Loading