Page MenuHomePhabricator

[CMAKE] Add an option to enable/disable hardening
ClosedPublic

Authored by Fabien on Mar 8 2019, 13:36.

Details

Summary

Tis mimics the --enable-hardening and --disable-hardening from
autotools. The default is to enable hardening.

Depends on D2653

Test Plan
mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja -v

Check the -fPIE flags is added on the compile lines.
Check the -pie flag is added on the linker lines.

rm -rf *
cmake -GNinja .. -DENABLE_HARDENING=ON
ninja -v

Check the -fPIE flags is added on the compile lines.
Check the -pie flag is added on the linker lines.

rm -rf *
cmake -GNinja .. -DENABLE_HARDENING=OFF
ninja -v

Check the -fPIE flags is no longer on the compile lines.
Check the -pie flag is no longer on the linker lines.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5191
Build 8445: Bitcoin ABC Buildbot (legacy)
Build 8444: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 8 2019, 21:25
This revision was automatically updated to reflect the committed changes.