aboutsummaryrefslogtreecommitdiff
path: root/third-party
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2023-09-28 20:51:20 +0200
committerHans Wennborg <hans@chromium.org>2023-09-28 21:11:09 +0200
commit9625b74cdbc7576abd072dc8dbd94e07d5ea33b9 (patch)
treee42c524e3053b32ca034590631c6b038268e7d26 /third-party
parent82001e0d01bc7545b3329866eed767c5fff7dc9e (diff)
downloadllvm-9625b74cdbc7576abd072dc8dbd94e07d5ea33b9.zip
llvm-9625b74cdbc7576abd072dc8dbd94e07d5ea33b9.tar.gz
llvm-9625b74cdbc7576abd072dc8dbd94e07d5ea33b9.tar.bz2
[gtest] Disable new posix::FOpen Windows implementation for now
The new implementation was brought in with the gtest update in a866ce789eb99da4d7a486eeb60a53be6c75f4fd, but it crashes when building with rpmalloc, see https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534 Comment out the new implementation basically gives us the code before the gtest update.
Diffstat (limited to 'third-party')
-rw-r--r--third-party/unittest/googletest/include/gtest/internal/gtest-port.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-port.h b/third-party/unittest/googletest/include/gtest/internal/gtest-port.h
index b887e24..a17349e 100644
--- a/third-party/unittest/googletest/include/gtest/internal/gtest-port.h
+++ b/third-party/unittest/googletest/include/gtest/internal/gtest-port.h
@@ -2087,7 +2087,10 @@ GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
inline int ChDir(const char* dir) { return chdir(dir); }
#endif
inline FILE* FOpen(const char* path, const char* mode) {
-#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
+// FIXME: This doesn't work when building with rpmalloc, see
+// https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534
+// so hacking it out for now.
+#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW) && 0
struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
std::wstring_convert<wchar_codecvt> converter;
std::wstring wide_path = converter.from_bytes(path);