nixpkgs/pkgs/servers/nosql/mongodb/fix-gcc-Wno-exceptions-5.0.patch

44 lines
1.5 KiB
Diff

From e78b2bf6eaa0c43bd76dbb841add167b443d2bb0 Mon Sep 17 00:00:00 2001
From: Mark Benvenuto <mark.benvenuto@mongodb.com>
Date: Mon, 21 Jun 2021 11:36:56 -0400
Subject: [PATCH] SERVER-57688 Fix debug gcc 11 and clang 12 builds on Fedora
34
---
SConstruct | 4 ----
src/mongo/db/query/plan_summary_stats.h | 4 +++-
src/mongo/util/shim_boost_assert.cpp | 1 +
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/SConstruct b/SConstruct
index 25fd4a248d0c..23cff6f9da53 100644
--- a/SConstruct
+++ b/SConstruct
@@ -3108,10 +3108,6 @@ def doConfigure(myenv):
# harmful to capture unused variables we are suppressing for now with a plan to fix later.
AddToCCFLAGSIfSupported(myenv, "-Wno-unused-lambda-capture")
- # This warning was added in clang-5 and incorrectly flags our implementation of
- # exceptionToStatus(). See https://bugs.llvm.org/show_bug.cgi?id=34804
- AddToCCFLAGSIfSupported(myenv, "-Wno-exceptions")
-
# Enable sized deallocation support.
AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation')
diff --git a/src/mongo/db/query/plan_summary_stats.h b/src/mongo/db/query/plan_summary_stats.h
index 58677ab20d25..cfaa2053d16f 100644
--- a/src/mongo/db/query/plan_summary_stats.h
+++ b/src/mongo/db/query/plan_summary_stats.h
@@ -29,9 +29,11 @@
#pragma once
-#include "mongo/util/container_size_helper.h"
+#include <optional>
#include <string>
+#include "mongo/util/container_size_helper.h"
+
namespace mongo {
/**