[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
GitOrigin-RevId: 2d2e23e89b83ce9c7c2fec011abe16da74711b54
1 file changed