From 13f0b85212275fb6f724b14c2c5385385e5e723f Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 15 Jun 2021 09:47:29 +0100 Subject: [PATCH] Fix Windows builders after 244601f4720d9cda6e81ea1908f3ce905a4bcb0e Apparently __builtin_abort() is not supported when targetting Windows. This should fix the following builder errors: clang_rt.builtins-x86_64.lib(int_util.c.obj) : error LNK2019: unresolved external symbol __builtin_abort referenced in function __compilerrt_abort_impl --- compiler-rt/lib/builtins/int_util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler-rt/lib/builtins/int_util.c b/compiler-rt/lib/builtins/int_util.c index e70a6fa..bbb735c 100644 --- a/compiler-rt/lib/builtins/int_util.c +++ b/compiler-rt/lib/builtins/int_util.c @@ -41,6 +41,10 @@ void __compilerrt_abort_impl(const char *file, int line, const char *function) { #else +#ifdef _WIN32 +#include +#endif + #ifndef _WIN32 __attribute__((weak)) __attribute__((visibility("hidden"))) @@ -49,6 +53,8 @@ void __compilerrt_abort_impl(const char *file, int line, const char *function) { #if !__STDC_HOSTED__ // Avoid depending on libc when compiling with -ffreestanding. __builtin_trap(); +#elif defined(_WIN32) + abort(); #else __builtin_abort(); #endif -- 2.7.4