[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:
PJ Reiniger
2026-01-03 16:32:16 -05:00
committed by GitHub
parent 5a3f2ce13a
commit 32cd2ddf8e
37 changed files with 36 additions and 58 deletions

View File

@@ -0,0 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tyler Veness <calcmogul@gmail.com>
Date: Sun, 17 Mar 2024 14:51:11 -0700
Subject: [PATCH 32/35] Remove auto-conversion from raw_ostream
---
llvm/lib/Support/raw_ostream.cpp | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 816242fa1139d66467435a4b1acbfa93f799c00f..40da41028c75f4906b76e85b36ca546494d5bd12 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -19,7 +19,6 @@
#include "wpi/util/SmallVector.hpp"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
-#include "llvm/Support/AutoConvert.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
@@ -604,21 +603,13 @@ void raw_fd_ostream::anchor() {}
raw_fd_ostream &llvm::outs() {
// Set buffer settings to model stdout behavior.
std::error_code EC;
-#ifdef __MVS__
- EC = enablezOSAutoConversion(STDOUT_FILENO);
- assert(!EC);
-#endif
static raw_fd_ostream* S = new raw_fd_ostream("-", EC, sys::fs::OF_None);
assert(!EC);
return *S;
}
raw_fd_ostream &llvm::errs() {
- // Set standard error to be unbuffered.
-#ifdef __MVS__
- std::error_code EC = enablezOSAutoConversion(STDERR_FILENO);
- assert(!EC);
-#endif
+ // Set standard error to be unbuffered and tied to outs() by default.
static raw_fd_ostream* S = new raw_fd_ostream(STDERR_FILENO, false, true);
return *S;
}