[CMAKE] Harden the executables
Summary:
This adds the hardening options to cmake.
This diffs is a squashed version of D2658, D2659, D2660 plus the
hardening options for windows executables.
Depends on D2666
Test Plan:
# Linux mkdir buildcmake && cd buildcmake cmake -GNinja .. ninja -v ../contrib/devtools/security-check.py src/bitcoind
The security-check script should output no error.
# Win32 rm -rf * cmake -GNinja .. -DBUILD_BITCOIN_SEEDER=OFF \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win32.cmake ninja -v ../contrib/devtools/security-check.py src/bitcoind.exe
The security-check script should output no error.
# Win64 rm -rf * cmake -GNinja .. -DBUILD_BITCOIN_SEEDER=OFF \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win64.cmake ninja -v ../contrib/devtools/security-check.py src/bitcoind.exe
The security-check script should output no error.
OSX build is not working yet with CMake.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2687