forked from OSchip/llvm-project
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:
parent
16f7a952ec
commit
13f0b85212
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue