This backports a fix for a major regression that will be part of the 15.0.1 release. See https://reviews.llvm.org/D133800 and https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213.