diff --git a/SConstruct b/SConstruct index 17df024c5594..5ea7aece3780 100755 --- a/SConstruct +++ b/SConstruct @@ -506,7 +506,7 @@ for env in [test_env, client_env, env]: if env['harden'] and env["PLATFORM"] != 'win32': env.AppendUnique(CCFLAGS = ["-fPIE"]) - if not env["have_fortify"] and "-O0" not in env["opt"]: + if not env.get("have_fortify") and "-O0" not in env["opt"]: env.AppendUnique(CPPDEFINES = ["_FORTIFY_SOURCE=2"]) if env["PLATFORM"] == 'darwin':