You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FEAT: Added Security Compiler Options in CMake (#316)
### Work Item / Issue Reference
<!--
IMPORTANT: Please follow the PR template guidelines below.
For mssql-python maintainers: Insert your ADO Work Item ID below (e.g.
AB#37452)
For external contributors: Insert Github Issue number below (e.g. #149)
Only one reference is required - either GitHub issue OR ADO Work Item.
-->
<!-- mssql-python maintainers: ADO Work Item -->
>
[AB#40193](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/40193)
-------------------------------------------------------------------
### Summary
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This pull request improves the build configuration for the
`mssql_python/pybind` project, focusing on security and diagnostics for
MSVC builds. The main changes enhance security compliance and provide
better visibility into the build process.
Build diagnostics:
* Enabled verbose output in CMake to show actual compiler and linker
commands by setting `CMAKE_VERBOSE_MAKEFILE` to `ON`.
Security compliance improvements (MSVC builds):
* Added security-related compiler options: `/GS` for buffer security
checks and `/guard:cf` for Control Flow Guard.
* Added security-related linker options: `/DYNAMICBASE` for ASLR,
`/NXCOMPAT` for DEP, and `/GUARD:CF` for Control Flow Guard.
* Conditionally applied `/SAFESEH` linker option for 32-bit builds to
enable Safe Structured Exception Handling; skipped for 64-bit builds.
* Added status messages to indicate when security flags are applied and
which options are enabled or skipped.
0 commit comments