Skip to content

Commit 11aab6e

Browse files
committed
chore: wip
1 parent e572aba commit 11aab6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/build-php.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,6 +2000,8 @@ exec ./configure "$@"
20002000
]
20012001

20022002
const patches = [
2003+
// Fix missing parentheses around operand - critical for macOS compilation
2004+
's/"r" p :/"r" (p) :/g',
20032005
// Fix "S" constraint (source register) - incompatible on macOS - handle leading whitespace/tabs
20042006
's/^([[:space:]]*)asm volatile\\("([^"]*)"\\s*::\\s*"S"\\s*\\(([^)]*)\\)\\);/\\1asm volatile("\\2" : : "r" \\3 : "memory");/g',
20052007
// Fix "D" constraint (destination register) issues - handle leading whitespace/tabs
@@ -2437,6 +2439,8 @@ function buildPhpWithSystemLibraries(config: BuildConfig, installPrefix: string)
24372439
// Fix inline assembly constraint issues comprehensively
24382440
// Replace problematic constraints with more compatible ones
24392441
const patches = [
2442+
// Fix missing parentheses around operand - critical for macOS compilation
2443+
's/"r" p :/"r" (p) :/g',
24402444
// Fix "S" constraint (source register) - incompatible on macOS
24412445
's/asm volatile\\("([^"]*)" :: "S" ([^)]*)\\)/asm volatile("$1" : : "r" $2 : "memory")/g',
24422446
// Fix "D" constraint (destination register) issues

0 commit comments

Comments
 (0)