Restore _FORTIFY_SOURCE in versioner.

Bug: http://b/118991081
Test: treehugger
Change-Id: I2818d8c27ecc5a48666013cdd0eaa26ec7900688
This commit is contained in:
Elliott Hughes 2019-11-06 14:35:34 -08:00
parent 590bdbe6e9
commit f7db8507ee

View file

@ -126,14 +126,7 @@ static void generateTargetCC1Flags(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSyste
cmd.push_back("-DANDROID");
cmd.push_back("-D__ANDROID_API__="s + std::to_string(type.api_level));
// FIXME: Re-enable FORTIFY properly once our clang in external/ is new enough
// to support diagnose_if without giving us syntax errors.
#if 0
cmd.push_back("-D_FORTIFY_SOURCE=2");
#else
cmd.push_back("-D_FORTIFY_SOURCE=0");
cmd.push_back("-D__BIONIC_DECLARE_FORTIFY_HELPERS");
#endif
cmd.push_back("-D_GNU_SOURCE");
cmd.push_back("-D_FILE_OFFSET_BITS="s + std::to_string(type.file_offset_bits));