-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Use C++20 and dynamically link the C++ standard library (#1572)
Signed-off-by: Julien Jerphanion <[email protected]> Co-authored-by: Johan Mabille <[email protected]>
- Loading branch information
1 parent
221e6a3
commit e0aa4ea
Showing
11 changed files
with
228 additions
and
33 deletions.
There are no files selected for viewing
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
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
13 changes: 13 additions & 0 deletions
13
...hird_party/vcpkg_overlays/boost-filesystem/5864f397ccad30f6e73221b90bdac57a303b9752.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,13 @@ | ||
diff --git a/src/operations.cpp b/src/operations.cpp | ||
index ca2fff3be..e22967e88 100644 | ||
--- a/src/operations.cpp | ||
+++ b/src/operations.cpp | ||
@@ -70,7 +70,7 @@ | ||
|
||
#include <unistd.h> | ||
#include <fcntl.h> | ||
-#if _POSIX_C_SOURCE < 200809L | ||
+#if !defined(BOOST_FILESYSTEM_HAS_POSIX_AT_APIS) | ||
#include <utime.h> | ||
#endif | ||
#include <limits.h> |
16 changes: 16 additions & 0 deletions
16
cpp/third_party/vcpkg_overlays/boost-filesystem/portfile.cmake
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,16 @@ | ||
# Automatically generated by scripts/boost/generate-ports.ps1 | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO boostorg/filesystem | ||
REF boost-1.80.0 | ||
SHA512 9e8c3151f65af1242014987b10009c6b0467d0da3da1813e709a7238669a54a7256097ec205e3ff430b3b00c8a29d06a7b666562c3285e4d6fb5e73857e24604 | ||
HEAD_REF master | ||
PATCHES | ||
5864f397ccad30f6e73221b90bdac57a303b9752.patch | ||
) | ||
|
||
include(${CURRENT_HOST_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) | ||
boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) | ||
include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) | ||
boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) |
86 changes: 86 additions & 0 deletions
86
cpp/third_party/vcpkg_overlays/boost-filesystem/vcpkg.json
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,86 @@ | ||
{ | ||
"$comment": "When changing this file also update and run scripts/boost/generate-ports.ps1", | ||
"name": "boost-filesystem", | ||
"version": "1.80.0", | ||
"port-version": 1, | ||
"description": "Boost filesystem module", | ||
"homepage": "https://github.com/boostorg/filesystem", | ||
"license": "BSL-1.0", | ||
"supports": "!uwp", | ||
"dependencies": [ | ||
{ | ||
"name": "boost-assert", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-atomic", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-build", | ||
"host": true, | ||
"version>=": "1.80.0#2" | ||
}, | ||
{ | ||
"name": "boost-config", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-container-hash", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-core", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-detail", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-io", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-iterator", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-modular-build-helper", | ||
"host": true, | ||
"version>=": "1.80.0#2" | ||
}, | ||
{ | ||
"name": "boost-predef", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-smart-ptr", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-system", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-throw-exception", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-type-traits", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-vcpkg-helpers", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "boost-winapi", | ||
"version>=": "1.80.0#1" | ||
}, | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
} | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
cpp/third_party/vcpkg_overlays/folly/0001-Include-missing-headers.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,27 @@ | ||
From 62fa03bc0c9eeb0b04f055bdb98847c6cf1b9908 Mon Sep 17 00:00:00 2001 | ||
From: Julien Jerphanion <[email protected]> | ||
Date: Wed, 15 May 2024 10:21:39 +0200 | ||
Subject: [PATCH] Include missing headers | ||
|
||
Signed-off-by: Julien Jerphanion <[email protected]> | ||
--- | ||
folly/system/AtFork.h | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/folly/system/AtFork.h b/folly/system/AtFork.h | ||
index da318ac01..009204465 100644 | ||
--- a/folly/system/AtFork.h | ||
+++ b/folly/system/AtFork.h | ||
@@ -21,6 +21,9 @@ | ||
#include <list> | ||
#include <map> | ||
#include <mutex> | ||
+#include <stdexcept> | ||
+#include <cstdlib> | ||
+#include <system_error> | ||
|
||
#include <folly/Function.h> | ||
|
||
-- | ||
2.44.0 | ||
|
27 changes: 27 additions & 0 deletions
27
cpp/third_party/vcpkg_overlays/folly/0002-Workaround-demangling-callback.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,27 @@ | ||
From bbee87997214e3ac5a54ed0ae6a6915e176b3bf1 Mon Sep 17 00:00:00 2001 | ||
From: Julien Jerphanion <[email protected]> | ||
Date: Wed, 15 May 2024 11:23:51 +0200 | ||
Subject: [PATCH] Workaround demangling callback | ||
|
||
Signed-off-by: Julien Jerphanion <[email protected]> | ||
--- | ||
folly/Demangle.cpp | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/folly/Demangle.cpp b/folly/Demangle.cpp | ||
index 1af58f20c..b6c13ca6b 100644 | ||
--- a/folly/Demangle.cpp | ||
+++ b/folly/Demangle.cpp | ||
@@ -58,7 +58,8 @@ static constexpr auto cxxabi_demangle = static_cast<char* (*)(...)>(nullptr); | ||
// | ||
// in contrast with cxxabi, where there are certainly other referenced symbols | ||
|
||
-#if __has_include(<demangle.h>) | ||
+// See: https://github.com/microsoft/vcpkg/issues/25214#issuecomment-1154172978 | ||
+#if 0 // __has_include(<demangle.h>) | ||
|
||
static constexpr auto liberty_demangle = cplus_demangle_v3_callback; | ||
|
||
-- | ||
2.44.0 | ||
|
27 changes: 27 additions & 0 deletions
27
cpp/third_party/vcpkg_overlays/folly/0003-Set-FOLLY_HAVE_SO_TIMESTAMPING-to-0.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,27 @@ | ||
From 74ee7653eb77a0b39852c2a676cf1a064e1676b8 Mon Sep 17 00:00:00 2001 | ||
From: Julien Jerphanion <[email protected]> | ||
Date: Wed, 15 May 2024 14:11:16 +0200 | ||
Subject: [PATCH] Set FOLLY_HAVE_SO_TIMESTAMPING to 0 | ||
|
||
Signed-off-by: Julien Jerphanion <[email protected]> | ||
--- | ||
folly/net/NetOps.h | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/folly/net/NetOps.h b/folly/net/NetOps.h | ||
index 23f23c145..7790848e9 100644 | ||
--- a/folly/net/NetOps.h | ||
+++ b/folly/net/NetOps.h | ||
@@ -120,7 +120,8 @@ struct mmsghdr { | ||
#define FOLLY_HAVE_MSG_ERRQUEUE 1 | ||
#ifdef SCM_TIMESTAMPING | ||
#ifndef FOLLY_HAVE_SO_TIMESTAMPING | ||
-#define FOLLY_HAVE_SO_TIMESTAMPING 1 | ||
+// See: https://github.com/conda-forge/folly-feedstock/blob/1f44286ea5c104cfead0d5cdbe85b52bde2b3066/recipe/build.sh#L10-L11C30 | ||
+#define FOLLY_HAVE_SO_TIMESTAMPING 0 | ||
#endif | ||
#ifndef TCP_ZEROCOPY_RECEIVE | ||
#define TCP_ZEROCOPY_RECEIVE 35 | ||
-- | ||
2.44.0 | ||
|
26 changes: 26 additions & 0 deletions
26
cpp/third_party/vcpkg_overlays/folly/0004-Do-not-use-PRId64.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,26 @@ | ||
From 4f1f3f4646c6f68040ea78a8be4b7887076d857c Mon Sep 17 00:00:00 2001 | ||
From: Julien Jerphanion <[email protected]> | ||
Date: Wed, 15 May 2024 14:47:36 +0200 | ||
Subject: [PATCH] Do not use PRId64 | ||
|
||
Signed-off-by: Julien Jerphanion <[email protected]> | ||
--- | ||
folly/Benchmark.cpp | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/folly/Benchmark.cpp b/folly/Benchmark.cpp | ||
index ffe4b41e2..6bbb40312 100644 | ||
--- a/folly/Benchmark.cpp | ||
+++ b/folly/Benchmark.cpp | ||
@@ -500,7 +500,7 @@ class BenchmarkResultsPrinter { | ||
break; | ||
case UserMetric::Type::CUSTOM: | ||
default: | ||
- printf(" %*" PRId64, int(name.length()), ptr->value); | ||
+ printf(" %*lld", (long long) int(name.length()), ptr->value); | ||
} | ||
} else { | ||
printf(" %*s", int(name.length()), "NaN"); | ||
-- | ||
2.44.0 | ||
|
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