[CMake] Passthrough CFLAGS when checking the compiler-rt path
authorPetr Hosek <phosek@chromium.org>
Wed, 14 Nov 2018 00:09:26 +0000 (00:09 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 14 Nov 2018 00:09:26 +0000 (00:09 +0000)
commit2d2e23e89b83ce9c7c2fec011abe16da74711b54
tree80d2f879ec682c106d207079b54e66461e2e6f6c
parent6f01cd07e411606b10aa251dca5ab47f7dc36a93
[CMake] Passthrough CFLAGS when checking the compiler-rt path

This is needed when cross-compiling for a different target since
CFLAGS may contain additional flags like -resource-dir which
change the location in which compiler-rt builtins are found.

Differential Revision: https://reviews.llvm.org/D54371

llvm-svn: 346820
compiler-rt/cmake/Modules/HandleCompilerRT.cmake
libcxx/cmake/Modules/HandleCompilerRT.cmake
libcxxabi/cmake/Modules/HandleCompilerRT.cmake
libunwind/cmake/Modules/HandleCompilerRT.cmake