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 {
79
79
ts = $Ts
80
80
vs_version = $VsVersion
81
81
vs_toolset = $VsToolset
82
+ debug_symbols = $True
82
83
options = @ ()
83
84
php_libraries = @ ()
84
85
extension_libraries = @ ()
@@ -145,6 +146,10 @@ Function Get-ExtensionConfig {
145
146
}
146
147
}
147
148
149
+ if ([System.Environment ]::GetEnvironmentVariable(" no-debug-symbols-$Extension " ) -eq ' true' ) {
150
+ $config.debug_symbols = $False
151
+ }
152
+
148
153
if ($env: AUTO_DETECT_LIBS -eq ' true' ) {
149
154
$detectedLibraries = Get-LibrariesFromConfig $Extension $VsVersion $Arch $configW32Content
150
155
if ($null -ne $detectedLibraries ) {
Original file line number Diff line number Diff line change @@ -16,16 +16,16 @@ Function Invoke-Build {
16
16
Add-StepLog " Building $ ( $Config.name ) extension"
17
17
try {
18
18
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
26
19
27
20
$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
+
29
29
$ref = $Config.ref
30
30
if ($env: ARTIFACT_NAMING_SCHEME -eq ' pecl' ) {
31
31
$ref = $Config.ref.ToLower ()
You can’t perform that action at this time.
0 commit comments