Skip to content

Commit

Permalink
Exclude std::abort from compilation when compiling CUDA with Clang (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
invexed committed May 4, 2020
1 parent 7b66e2f commit 7e57cac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <cstdarg>
#include <cstring> // for std::memmove
#include <cwchar>
#include <exception>

#include "format.h"
#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
Expand Down Expand Up @@ -47,7 +48,9 @@ namespace internal {

FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
print(stderr, "{}:{}: assertion failed: {}", file, line, message);
std::abort();
// Chosen instead of std::abort to satisfy Clang in CUDA mode during device
// code pass.
std::terminate();
}

#ifndef _MSC_VER
Expand Down

0 comments on commit 7e57cac

Please sign in to comment.