diff options
author | Chris Bieneman <beanz@apple.com> | 2016-08-23 20:07:07 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-08-23 20:07:07 +0000 |
commit | e77e46b1d7ea34861e8dd04202714d052a9a5926 (patch) | |
tree | a2e4433ae8b2e6f2cf5596938337ab34bc1db9a2 /CMakeLists.txt | |
parent | 33dc2ec73f002bfee219fc6cbd6b8a9fa7be8c7f (diff) |
driver: Support checking for rlimits via cmake (when bootstrapping)
Summary:
Add a cmake check for sys/resource.h and replace the __has_include() check with its result, in order to make it possible to use rlimits when building with compilers not supporting __has_include() -- i.e. when bootstrapping.
// Please also re-apply dfcd52eb1d8e5d322404b40414cb7331c7380a8c (llvm-config.h fix)
Patch by: Michał Górny
Reviewers: rsmith, beanz
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23744
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e6dde85bc2..aee0d0a242 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,6 +177,9 @@ if (LIBXML2_FOUND) set(CLANG_HAVE_LIBXML 1) endif() +include(CheckIncludeFile) +check_include_file(sys/resource.h CLANG_HAVE_RLIMITS) + set(CLANG_RESOURCE_DIR "" CACHE STRING "Relative directory from the Clang binary to its resource files.") |