Set _FORTIFY_SOURCE to 0 when compiling with clang

Summary:public
When compiling projects with this macro set to 1 (which is default on my mac),
infer couldn't get specs for some calls. They were replaced with
different functions by preprocessor.

Reviewed By: ddino

Differential Revision: D2944618

fb-gh-sync-id: df8b457
shipit-source-id: df8b457
master
Andrzej Kotulski 9 years ago committed by facebook-github-bot-5
parent 42ecddcf37
commit 7cb4165189

@ -39,4 +39,11 @@ done
# compiler can't elevate them to error level. # compiler can't elevate them to error level.
COMMAND+=("-Wno-everything") COMMAND+=("-Wno-everything")
# set _FORTIFY_SOURCE to 0 to prevent it from changing some function prototypes
# https://securityblog.redhat.com/2014/03/26/fortify-and-you/
# We always do it when building models so we should do same thing
# when building any source code
COMMAND+=("-D_FORTIFY_SOURCE=0")
"${COMMAND[@]}" "${COMMAND[@]}"

Loading…
Cancel
Save