This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][cmake] Build unit tests conditionally with _FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE
ClosedPublic

Authored by sdardis on May 12 2017, 8:36 AM.

Details

Summary

The sanitizer library unit tests for libc can get a different definition
of 'struct stat' to what the sanitizer library is built with for certain
targets.

For MIPS the size element of 'struct stat' is after a macro guarded
explicit padding element.

This patch resolves any possible inconsistency by adding the same
_FILE_OFFSET_BITS=64 and _LARGE_SOURCE with the same
conditions as the sanitizer library to the build flags for the unit tests.

This resolves a recurring build failure on the MIPS buildbots due to
'struct stat' defintion differences.

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis created this revision.May 12 2017, 8:36 AM
This revision is now accepted and ready to land.May 17 2017, 1:32 AM
This revision was automatically updated to reflect the committed changes.