More checks on MSVC (#29709)
Summary:
The flags `/sdl` and `/permissive-` are switched on automatically when using the VS GUI. Adding those checks will ensure that those annoying errors won't appear when users use the VS GUI to build their project.
More info:
https://docs.microsoft.com/en-us/cpp/build/reference/sdl-enable-additional-security-checks?view=vs-2017
https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=vs-2017
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29709
Differential Revision: D18473888
Pulled By: bddppq
fbshipit-source-id: 21156b0232a5dc3b566d14491d00bacb11493254