File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1446,13 +1446,17 @@ exec "$@"
1446
1446
// Fix "fixup not sufficiently aligned" errors in OPcache JIT on macOS
1447
1447
// Add compiler flags to ensure proper alignment for inline assembly
1448
1448
const additionalCFlags = [
1449
- '-mno-unaligned-access' , // ARM64-specific: prevent unaligned access
1450
1449
'-falign-functions=16' , // Align functions to 16-byte boundaries
1451
1450
'-falign-loops=16' , // Align loops to 16-byte boundaries
1452
1451
'-fno-strict-aliasing' , // Prevent strict aliasing optimizations
1453
1452
'-fno-delete-null-pointer-checks' , // Prevent null pointer optimizations
1454
1453
]
1455
1454
1455
+ // ARM64-specific flags that are not compatible with x86_64
1456
+ if ( config . arch === 'arm64' ) {
1457
+ additionalCFlags . push ( '-mno-unaligned-access' ) // ARM64-specific: prevent unaligned access
1458
+ }
1459
+
1456
1460
// Add these flags to CFLAGS and CXXFLAGS if they don't already exist
1457
1461
const currentCFlags = buildEnv . CFLAGS || ''
1458
1462
const currentCXXFlags = buildEnv . CXXFLAGS || ''
You can’t perform that action at this time.
0 commit comments