libcxxabi cross compile, config-ix.cmake, failed checks

I’m seeing a problem cross compiling libcxxabi to ARM using a tip of the tree LLVM/Clang build.

In config-ix.cmake, I’m seeing oddness with this line:
set(CMAKE_REQUIRED_FLAGS “${CMAKE_REQUIRED_FLAGS} -nodefaultlibs”)

If enabled, it will cause all subsequent compile flag checks to fail. Including ones known to be supported, such as -nostdinc++.

As a data point if I ignore the failed checks, and add these two lines, the build goes through. So -nostdinc++ clearly works.

set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -nostdinc++”)
set(CMAKE_SHARED_LINKER_FLAGS “${CMAKE_SHARED_LINKER_FLAGS} -lpthread”)

If I disable the line, all the checks work as expected, but the build fails related to undefined arm unwind references.

I’m currently on Bionic and CMake 3.12.4, and I’m invoking the build like this:
https://gist.github.com/jwinarske/9d0c89ce297a09fa303c0e943f82d780

Joel