File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -2361,16 +2361,17 @@ function toolset_get_compiler_name()
2361
2361
function toolset_is_64 ( )
2362
2362
{
2363
2363
if ( VS_TOOLSET ) {
2364
- return probe_binary ( PHP_CL , 64 , null , 'PHP_CL' ) ;
2364
+ return probe_binary ( PHP_CL , 64 ) ;
2365
2365
} else if ( CLANG_TOOLSET ) {
2366
- /* Seems to be impossible to get it from the clang binary, so lets use the normal cl.exe,
2367
- as clang should be running in VS environment. */
2368
- var vs_cl = PATH_PROG ( 'cl' , null , 'PHP_CL' )
2369
- return probe_binary ( vs_cl , 64 ) ;
2366
+ var command = 'cmd /c ""' + PHP_CL + '" -v"' ;
2367
+ var full = execute ( command + '" 2>&1"' ) ;
2368
+
2369
+ return null != full . match ( / x 8 6 _ 6 4 / ) ;
2370
2370
} else if ( INTEL_TOOLSET ) {
2371
- /*seems the easiest way as well for now */
2372
- var vs_cl = PATH_PROG ( 'cl' , null , 'PHP_CL' )
2373
- return probe_binary ( vs_cl , 64 ) ;
2371
+ var command = 'cmd /c ""' + PHP_CL + '" -v"' ;
2372
+ var full = execute ( command + '" 2>&1"' ) ;
2373
+
2374
+ return null != full . match ( / I n t e l \( R \) 6 4 / ) ;
2374
2375
}
2375
2376
2376
2377
ERROR ( "Wrong toolset" ) ;
You can’t perform that action at this time.
0 commit comments