File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1103,16 +1103,16 @@ exec "$@"
1103
1103
log ( 'Building PHP...' )
1104
1104
const jobs = execSync ( 'nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2' , { encoding : 'utf8' } ) . trim ( )
1105
1105
1106
- // Limit parallel jobs on macOS to prevent compilation hangs
1107
- const maxJobs = config . platform === 'darwin' ? Math . min ( parseInt ( jobs ) , 2 ) : parseInt ( jobs )
1108
- log ( `Using ${ maxJobs } parallel jobs for compilation` )
1106
+ // Disable parallel compilation on macOS to prevent hangs on mbstring and other extensions
1107
+ const maxJobs = config . platform === 'darwin' ? 1 : parseInt ( jobs )
1108
+ log ( `Using ${ maxJobs } parallel jobs for compilation ( ${ config . platform === 'darwin' ? 'sequential build for macOS stability' : 'parallel build' } ) ` )
1109
1109
1110
1110
execSync ( `make -j${ maxJobs } ` , {
1111
1111
stdio : 'inherit' ,
1112
1112
cwd : phpSourceDir ,
1113
1113
env : buildEnv ,
1114
- // Add timeout to prevent infinite hangs
1115
- timeout : 45 * 60 * 1000 // 45 minutes
1114
+ // Add timeout to prevent infinite hangs - longer for sequential macOS builds
1115
+ timeout : config . platform === 'darwin' ? 90 * 60 * 1000 : 45 * 60 * 1000 // 90 min for macOS, 45 min for others
1116
1116
} )
1117
1117
1118
1118
log ( 'Installing PHP...' )
You can’t perform that action at this time.
0 commit comments