mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[upstream_utils] Remove patch that results in building with NDEBUG causing ODR issues (#8539)
Semiwrap / meson / robotpy define `NDEBUG` when building their software in all modes, while `allwplib` only does it when building debug. This causes the size of `DenseMap` to differ between the shared libraries built here, and the extension modules built in `mostrobotpy`, causing segfaults when you try to execute code that uses `DenseMap`. This is not a problem with the robotpy code in `allwpilib`, because bazel uses the exact same compiler flags when building the shared libraries and pybind11 extensions.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Tyler Veness <calcmogul@gmail.com>
|
||||
Date: Tue, 17 Sep 2024 15:30:31 -0700
|
||||
Subject: [PATCH 30/35] raw_ostream: Replace errnoAsErrorCode()
|
||||
|
||||
---
|
||||
llvm/lib/Support/raw_ostream.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
|
||||
index 7561f818287d208c628a126c3f8a6f7d531df236..816242fa1139d66467435a4b1acbfa93f799c00f 100644
|
||||
--- a/llvm/lib/Support/raw_ostream.cpp
|
||||
+++ b/llvm/lib/Support/raw_ostream.cpp
|
||||
@@ -523,7 +523,7 @@ void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) {
|
||||
}
|
||||
#endif
|
||||
// Otherwise it's a non-recoverable error. Note it and quit.
|
||||
- error_detected(errnoAsErrorCode());
|
||||
+ error_detected(std::error_code(errno, std::generic_category()));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ uint64_t raw_fd_ostream::seek(uint64_t off) {
|
||||
pos = ::lseek(FD, off, SEEK_SET);
|
||||
#endif
|
||||
if (pos == (uint64_t)-1)
|
||||
- error_detected(errnoAsErrorCode());
|
||||
+ error_detected(std::error_code(errno, std::generic_category()));
|
||||
return pos;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user