-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[workspace] Cherry-pick various patches from upstreams (#22363)
The new patches all relate to removing global variables. For packages we're already touching here to add new upstream patches, we also take a moment to refresh the older upstream patches with more up-to-date commentary and/or content.
- Loading branch information
1 parent
f6bd995
commit f8c7471
Showing
20 changed files
with
1,354 additions
and
59 deletions.
There are no files selected for viewing
15 changes: 10 additions & 5 deletions
15
tools/workspace/abseil_cpp_internal/patches/upstream/civil_time_linkopts.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
tools/workspace/abseil_cpp_internal/patches/upstream/specific_iostream_includes.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[abseil-cpp] Remove unncessary <iostream> includes | ||
|
||
Submitted upstream as https://github.com/abseil/abseil-cpp/pull/1801 | ||
but Google requested to implement this remaining part of the patch in | ||
a different way ("change that code to output to a std::string and let | ||
the user dump it"). | ||
|
||
If we don't see them fix it the next few months, maybe we can try re- | ||
submitting a new patch using that other approach, ourselves. | ||
|
||
--- absl/strings/cord.cc | ||
+++ absl/strings/cord.cc | ||
@@ -23,7 +23,6 @@ | ||
#include <cstring> | ||
#include <iomanip> | ||
#include <ios> | ||
-#include <iostream> | ||
#include <limits> | ||
#include <memory> | ||
#include <ostream> | ||
|
||
--- absl/strings/internal/cord_rep_btree.cc | ||
+++ absl/strings/internal/cord_rep_btree.cc | ||
@@ -17,10 +17,13 @@ | ||
#include <atomic> | ||
#include <cassert> | ||
#include <cstdint> | ||
-#include <iostream> | ||
#include <ostream> | ||
#include <string> | ||
|
||
+#ifndef NDEBUG | ||
+#include <iostream> | ||
+#endif | ||
+ | ||
#include "absl/base/attributes.h" | ||
#include "absl/base/config.h" | ||
#include "absl/base/internal/raw_logging.h" | ||
|
||
--- absl/strings/internal/cord_rep_btree_navigator.h | ||
+++ absl/strings/internal/cord_rep_btree_navigator.h | ||
@@ -16,7 +16,6 @@ | ||
#define ABSL_STRINGS_INTERNAL_CORD_REP_BTREE_NAVIGATOR_H_ | ||
|
||
#include <cassert> | ||
-#include <iostream> | ||
|
||
#include "absl/strings/internal/cord_internal.h" | ||
#include "absl/strings/internal/cord_rep_btree.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tools/workspace/clarabel_cpp_internal/patches/upstream/pr52.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[Clarabel.cpp] Cherry-pick of https://github.com/oxfordcontrol/Clarabel.cpp/pull/52 | ||
|
||
We can drop this patch once we upgrade to a release that contains it. | ||
|
||
From: Jeremy Nimmer <[email protected]> | ||
Date: Mon, 30 Dec 2024 17:48:20 -0800 | ||
Subject: [PATCH] Remove unncessary <iostream> include | ||
|
||
Including iostream means introducing the static (global) constructors | ||
and destructors for std::cin, std::cerr, and std::cout. That extra | ||
init and fini code is undesirable when those streams are not actually | ||
used. | ||
|
||
--- include/cpp/CscMatrix.h | ||
+++ include/cpp/CscMatrix.h | ||
@@ -1,7 +1,6 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
-#include <iostream> | ||
#include <type_traits> | ||
|
||
namespace clarabel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.