diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-07-19 20:19:56 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-07-19 20:19:56 +0000 |
| commit | 3816c53f040cc6aa06425978dd504b0bd5b7899c (patch) | |
| tree | 1de5a1b9eb85436d409e2c3aac6d2d3f45a5641e /llvm/cmake | |
| parent | 2f984cab4fa7b8cf07e87965fb334e9d16e7e296 (diff) | |
| download | bcm5719-llvm-3816c53f040cc6aa06425978dd504b0bd5b7899c.tar.gz bcm5719-llvm-3816c53f040cc6aa06425978dd504b0bd5b7899c.zip | |
Use posix_fallocate instead of ftruncate.
This makes sure that space is actually available. With this change
running lld on a full file system causes it to exit with
failed to open foo: No space left on device
instead of crashing with a sigbus.
llvm-svn: 276017
Diffstat (limited to 'llvm/cmake')
| -rwxr-xr-x | llvm/cmake/config-ix.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake index b363a357c58..25cf23ad4bf 100755 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -162,6 +162,7 @@ check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT) check_symbol_exists(isatty unistd.h HAVE_ISATTY) check_symbol_exists(futimens sys/stat.h HAVE_FUTIMENS) check_symbol_exists(futimes sys/time.h HAVE_FUTIMES) +check_symbol_exists(posix_fallocate fcntl.h HAVE_POSIX_FALLOCATE) if( HAVE_SETJMP_H ) check_symbol_exists(longjmp setjmp.h HAVE_LONGJMP) check_symbol_exists(setjmp setjmp.h HAVE_SETJMP) |

