macOS 10.13 added a new API (futimens). This API is only available on macOS 10.13 and later, but the cmake check we have in place only tests if the symbol is present and ignores the availability attribute. Luckily we have new warning for this and by making this warning an error the cmake check will return the correct result.
See also rdar://problem/33992750.
I had to include HandleLLVMOptions.cmake into config-ix.cmake to make this work. I am not sure if this is the correct approach. I think we should do this anyways, because we should run all the checks with the same options that we use to actually compile LLVM.
Is there a reason why we are not doing this already?
In the initial patch I am making the warning an error for all platforms. Should I make this change Darwin specific?