Fix Windows builders after 244601f472

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
This commit is contained in:
Alex Richardson 2021-06-15 09:47:29 +01:00
parent 16f7a952ec
commit 13f0b85212

View file

@ -41,6 +41,10 @@ void __compilerrt_abort_impl(const char *file, int line, const char *function) {
#else
#ifdef _WIN32
#include <stdlib.h>
#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