[PATCH] D128514: [Build][NFC] Fixes for building on Windows with libc++
Andrew Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 07:42:14 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc0ef1ffc9e2f: [Build][NFC] Fixes for building on Windows with libc++ (authored by andrewng).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128514/new/
https://reviews.llvm.org/D128514
Files:
llvm/include/llvm/Support/RWMutex.h
llvm/lib/Support/NativeFormatting.cpp
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
Index: llvm/tools/llvm-exegesis/lib/X86/Target.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -31,6 +31,9 @@
#include <immintrin.h>
#include <intrin.h>
#endif
+#if defined(__x86_64__) && defined(_MSC_VER)
+#include <float.h> // For _clearfp in ~X86SavedState().
+#endif
namespace llvm {
namespace exegesis {
Index: llvm/lib/Support/NativeFormatting.cpp
===================================================================
--- llvm/lib/Support/NativeFormatting.cpp
+++ llvm/lib/Support/NativeFormatting.cpp
@@ -14,6 +14,10 @@
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include <float.h> // For _fpclass in llvm::write_double.
+#endif
+
using namespace llvm;
template<typename T, std::size_t N>
Index: llvm/include/llvm/Support/RWMutex.h
===================================================================
--- llvm/include/llvm/Support/RWMutex.h
+++ llvm/include/llvm/Support/RWMutex.h
@@ -93,8 +93,8 @@
/// running in multithreaded mode.
template <bool mt_only> class SmartRWMutex {
// shared_mutex (C++17) is more efficient than shared_timed_mutex (C++14)
- // on Windows and always available on MSVC.
-#if defined(_MSC_VER) || __cplusplus > 201402L
+ // on Windows and always available on MSVC except with libc++.
+#if (defined(_MSC_VER) && !defined(_LIBCPP_VERSION)) || __cplusplus > 201402L
std::shared_mutex impl;
#else
#if !defined(LLVM_USE_RW_MUTEX_IMPL)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128514.441690.patch
Type: text/x-patch
Size: 1591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220701/7b07972b/attachment.bin>
More information about the llvm-commits
mailing list