Fix stack protection with LTO.

(cherry-picked from commit 5a2d1bc992)
This commit is contained in:
Pentarctagon 2018-06-10 20:23:27 -05:00
parent 49d53795a6
commit 39785177e2

View file

@ -504,6 +504,9 @@ for env in [test_env, client_env, env]:
env.AppendUnique(LINKFLAGS = ["-fPIE", "-pie", "-Wl,-z,now,-z,relro"])
env.AppendUnique(CPPDEFINES = ["_FORTIFY_SOURCE=2"])
if env["enable_lto"] == True:
env.AppendUnique(LINKFLAGS = ["-fstack-protector-strong"])
# #
# Start determining options for debug build
# #