Skip to content

Commit

Permalink
Added linker flag too
Browse files Browse the repository at this point in the history
  • Loading branch information
yitam committed Nov 13, 2018
1 parent a4adac2 commit 01e7230
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions source/pdo_sqlsrv/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ if( PHP_PDO_SQLSRV != "no" ) {
if (PHP_DEBUG != "yes") ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/guard:cf /O2" );
ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/D ZEND_WIN32_FORCE_INLINE" );
if (VCVERS >= 1913) {
ADD_FLAG("LDFLAGS_PDO_SQLSRV", "/d2:-guardspecload");
ADD_FLAG("CFLAGS_PDO_SQLSRV", "/Qspectre");
} else if (VCVERS == 1900) {
var subver1900 = probe_binary(PHP_CL).substr(6);
if (subver1900 >= 24241) {
ADD_FLAG("LDFLAGS_PDO_SQLSRV", "/d2:-guardspecload");
ADD_FLAG('CFLAGS_PDO_SQLSRV', "/Qspectre");
}
}
Expand Down
4 changes: 3 additions & 1 deletion source/sqlsrv/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ if( PHP_SQLSRV != "no" ) {
ADD_FLAG( "CFLAGS_SQLSRV", "/GS" );
ADD_FLAG( "CFLAGS_SQLSRV", "/Zi" );
if (VCVERS >= 1913) {
ADD_FLAG("LDFLAGS_SQLSRV", "/d2:-guardspecload");
ADD_FLAG("CFLAGS_SQLSRV", "/Qspectre");
} else if (VCVERS == 1900) {
var subver1900 = probe_binary(PHP_CL).substr(6);
if (subver1900 >= 24241) {
ADD_FLAG("LDFLAGS_SQLSRV", "/d2:-guardspecload");
ADD_FLAG('CFLAGS_SQLSRV', "/Qspectre");
}
}
if (PHP_DEBUG != "yes") ADD_FLAG( "CFLAGS_SQLSRV", "/guard:cf /O2" );
EXTENSION("sqlsrv", sqlsrv_src_class , PHP_SQLSRV_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
} else {
WARNING("sqlsrv not enabled; libraries and headers not found");
}
}
}

0 comments on commit 01e7230

Please sign in to comment.