File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
extension/BuildPhpExtension Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1+
2+ call phpize 2 >& 1
3+ call configure --with-php-build=" ..\deps" OPTIONS --with-mp=" disable" 2 >& 1
4+ nmake /nologo 2 >& 1
5+ exit %errorlevel%
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ Function Get-ExtensionConfig {
7979 ts = $Ts
8080 vs_version = $VsVersion
8181 vs_toolset = $VsToolset
82+ debug_symbols = $True
8283 options = @ ()
8384 php_libraries = @ ()
8485 extension_libraries = @ ()
@@ -145,6 +146,10 @@ Function Get-ExtensionConfig {
145146 }
146147 }
147148
149+ if ([System.Environment ]::GetEnvironmentVariable(" no-debug-symbols-$Extension " ) -eq ' true' ) {
150+ $config.debug_symbols = $False
151+ }
152+
148153 if ($env: AUTO_DETECT_LIBS -eq ' true' ) {
149154 $detectedLibraries = Get-LibrariesFromConfig $Extension $VsVersion $Arch $configW32Content
150155 if ($null -ne $detectedLibraries ) {
Original file line number Diff line number Diff line change @@ -16,16 +16,16 @@ Function Invoke-Build {
1616 Add-StepLog " Building $ ( $Config.name ) extension"
1717 try {
1818 Set-GAGroup start
19- $bat_content = @ ()
20- $bat_content += " "
21- $bat_content += " call phpize 2>&1"
22- $bat_content += " call configure --with-php-build=`" ..\deps`" $ ( $Config.options ) --with-mp=`" disable`" --enable-debug-pack 2>&1"
23- $bat_content += " nmake /nologo 2>&1"
24- $bat_content += " exit %errorlevel%"
25- Set-Content - Encoding " ASCII" - Path task.bat - Value $bat_content
2619
2720 $builder = " php-sdk\phpsdk-starter.bat"
28- $task = (Get-Item - Path " ." - Verbose).FullName + ' \task.bat'
21+ $task = [System.IO.Path ]::Combine($PSScriptRoot , ' ..\config\task.bat' )
22+
23+ $options = $Config.options
24+ if ($Config.debug_symbols ) {
25+ $options += " --enable-debug-pack"
26+ }
27+ Set-Content - Path $task - Value (Get-Content - Path $task - Raw).Replace(" OPTIONS" , $options )
28+
2929 $ref = $Config.ref
3030 if ($env: ARTIFACT_NAMING_SCHEME -eq ' pecl' ) {
3131 $ref = $Config.ref.ToLower ()
You can’t perform that action at this time.
0 commit comments