[llvm-branch-commits] [libcxx] 0d7bd72 - [libcxx] Apply msvcrt specific exception for lgamma() to mingw configurations, too

Martin Storsjö via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 2 00:00:02 PST 2020


Author: Martin Storsjö
Date: 2020-12-02T09:55:16+02:00
New Revision: 0d7bd72f5ab48b2f4a903e21985ae004c12ce265

URL: https://github.com/llvm/llvm-project/commit/0d7bd72f5ab48b2f4a903e21985ae004c12ce265
DIFF: https://github.com/llvm/llvm-project/commit/0d7bd72f5ab48b2f4a903e21985ae004c12ce265.diff

LOG: [libcxx] Apply msvcrt specific exception for lgamma() to mingw configurations, too

This fixes linking code that uses some bits of the <random> header
on mingw targets.

Differential Revision: https://reviews.llvm.org/D92379

Added: 
    

Modified: 
    libcxx/include/random

Removed: 
    


################################################################################
diff  --git a/libcxx/include/random b/libcxx/include/random
index 3cb2d30ed732..760a6eb2d46f 100644
--- a/libcxx/include/random
+++ b/libcxx/include/random
@@ -4035,12 +4035,12 @@ public:
         {return !(__x == __y);}
 };
 
-#ifndef _LIBCPP_MSVCRT
+#ifndef _LIBCPP_MSVCRT_LIKE
 extern "C" double lgamma_r(double, int *);
 #endif
 
 inline _LIBCPP_INLINE_VISIBILITY double __libcpp_lgamma(double __d) {
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_LIBCPP_MSVCRT_LIKE)
   return lgamma(__d);
 #else
   int __sign;


        


More information about the llvm-branch-commits mailing list