Skip to content

Commit 8a59667

Browse files
committed
Fix non cross compile usage
1 parent a65447d commit 8a59667

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/phpsdk_setshell.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,15 @@ if /i "%PHP_SDK_OS_ARCH%"=="x64" (
173173
set HOST_ARCH_NAME=%PHP_SDK_ARCH%
174174
)
175175

176+
if "%HOST_ARCH_NAME%"=="%TARGET_ARCH_NAME%" (
177+
set VCVARSALL_ARCH_NAME=%HOST_ARCH_NAME%
178+
) else (
179+
set VCVARSALL_ARCH_NAME=%HOST_ARCH_NAME%_%TARGET_ARCH_NAME%
180+
)
176181
if 15 gtr %PHP_SDK_VS_NUM% (
177-
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" !HOST_ARCH_NAME!_!TARGET_ARCH_NAME!
182+
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" !VCVARSALL_ARCH_NAME!
178183
) else (
179-
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" !HOST_ARCH_NAME!_!TARGET_ARCH_NAME!
184+
set PHP_SDK_VS_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" !VCVARSALL_ARCH_NAME!
180185
)
181186

182187
rem echo Visual Studio VC path %PHP_SDK_VC_DIR%

0 commit comments

Comments
 (0)