This patch is cherry-picked from 04b0a4e2, and amended to prevent an undefined reference to `llvm::EnableABIBreakingChecks'