Skip to content

Commit 9caffe7

Browse files
authored
Merge pull request #126 from owent/dev
Dev
2 parents 6c3ff81 + 4b66116 commit 9caffe7

30 files changed

+614
-33
lines changed

.github/workflows/build.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: # @see https://help.github.com/en/articles/events-that-trigger-workflows#web
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
env:
9+
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE: ONLY
810

911
jobs:
1012
format:
@@ -134,7 +136,7 @@ jobs:
134136
mkdir -p /usr/local/share/vcpkg/include
135137
bash ci/do_ci.sh gcc.vcpkg.test ;
136138
- name: Cache packages
137-
uses: actions/cache@v2
139+
uses: actions/cache@v4
138140
with:
139141
path: |
140142
/usr/local/share/vcpkg/installed
@@ -151,7 +153,7 @@ jobs:
151153
# run: |
152154
# C:/msys64/msys2_shell.cmd -mingw64 -defterm -no-start -here -lc "ci/do_ci.sh msys2.mingw.static.test"
153155
# - name: Cache packages
154-
# uses: actions/cache@v2
156+
# uses: actions/cache@v4
155157
# with:
156158
# path: |
157159
# third_party/test/packages
@@ -219,7 +221,7 @@ jobs:
219221
run: |
220222
pwsh ci/do_ci.ps1 msvc.vcpkg.test ;
221223
- name: Cache packages
222-
uses: actions/cache@v2
224+
uses: actions/cache@v4
223225
with:
224226
path: |
225227
C:/vcpkg/installed

ci/do_ci.ps1

+6
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ elseif ( $RUN_MODE -eq "msvc.vcpkg.test" ) {
280280
<UseStructuredOutput>false</UseStructuredOutput>
281281
</PropertyGroup>
282282
</Project>" > Directory.Build.props
283+
if(Test-Path "$ENV:VCPKG_INSTALLATION_ROOT/buildtrees") {
284+
Remove-Item -Recurse -Force "$ENV:VCPKG_INSTALLATION_ROOT/buildtrees"
285+
}
286+
if(Test-Path "$ENV:VCPKG_INSTALLATION_ROOT/packages") {
287+
Remove-Item -Recurse -Force "$ENV:VCPKG_INSTALLATION_ROOT/packages"
288+
}
283289
& cmake .. -G "$Env:CMAKE_GENERATOR" -A x64 "-DCMAKE_TOOLCHAIN_FILE=$ENV:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
284290
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md "-DCMAKE_BUILD_TYPE=$Env:CI_BUILD_CONFIGURE_TYPE" "-DCMAKE_SYSTEM_VERSION=$selectWinSDKVersion" `
285291
"-DATFRAMEWORK_CMAKE_TOOLSET_THIRD_PARTY_LOW_MEMORY_MODE=ON" $ATFRAMEWORK_CMAKE_TOOLSET_CI_OPTIONS

ci/do_ci.sh

+12
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ elif [[ "$1" == "gcc.vcpkg.test" ]]; then
251251
echo "$1"
252252
[ ! -z "$VCPKG_INSTALLATION_ROOT" ]
253253
vcpkg install --triplet=x64-linux fmt zlib lz4 zstd libuv openssl curl libwebsockets yaml-cpp rapidjson flatbuffers protobuf grpc gtest benchmark civetweb prometheus-cpp mimalloc
254+
if [ -e "$VCPKG_INSTALLATION_ROOT/buildtrees" ]; then
255+
rm -rf "$VCPKG_INSTALLATION_ROOT/buildtrees"
256+
fi
257+
if [ -e "$VCPKG_INSTALLATION_ROOT/packages" ]; then
258+
rm -rf "$VCPKG_INSTALLATION_ROOT/packages"
259+
fi
254260
mkdir -p test/build_jobs_dir
255261
cd test/build_jobs_dir
256262
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-linux -DATFRAMEWORK_CMAKE_TOOLSET_THIRD_PARTY_LOW_MEMORY_MODE=ON \
@@ -390,6 +396,12 @@ elif [[ "$1" == "msvc.vcpkg.test" ]]; then
390396
<UseStructuredOutput>false</UseStructuredOutput>
391397
</PropertyGroup>
392398
</Project>" > Directory.Build.props
399+
if [ -e "$VCPKG_INSTALLATION_ROOT/buildtrees" ]; then
400+
rm -rf "$VCPKG_INSTALLATION_ROOT/buildtrees"
401+
fi
402+
if [ -e "$VCPKG_INSTALLATION_ROOT/packages" ]; then
403+
rm -rf "$VCPKG_INSTALLATION_ROOT/packages"
404+
fi
393405
cd test/build_jobs_dir
394406
if [[ "x$CMAKE_GENERATOR" == "x" ]]; then
395407
CMAKE_GENERATOR="Visual Studio 17 2022"

ports/algorithm/tbb-v2022.0.0.patch

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake
2+
index dcd6663..3f39e58 100644
3+
--- a/cmake/compilers/Clang.cmake
4+
+++ b/cmake/compilers/Clang.cmake
5+
@@ -63,7 +63,7 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN)
6+
endif()
7+
8+
# Clang flags to prevent compiler from optimizing out security checks
9+
-set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security -fPIC $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:-fstack-protector-strong>)
10+
+set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security -fPIC)
11+
12+
# -z switch is not supported on MacOS
13+
if (NOT APPLE)
14+
diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
15+
index cf6d8bd..f82d18f 100644
16+
--- a/cmake/compilers/GNU.cmake
17+
+++ b/cmake/compilers/GNU.cmake
18+
@@ -104,7 +104,7 @@ endif ()
19+
# Gnu flags to prevent compiler from optimizing out security checks
20+
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv)
21+
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security
22+
- -fstack-protector-strong )
23+
+ )
24+
# -z switch is not supported on MacOS and MinGW
25+
if (NOT APPLE AND NOT MINGW)
26+
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now,-z,noexecstack)
27+
diff --git a/src/tbb/threading_control.cpp b/src/tbb/threading_control.cpp
28+
index 7a62b33..6695191 100644
29+
--- a/src/tbb/threading_control.cpp
30+
+++ b/src/tbb/threading_control.cpp
31+
@@ -65,7 +65,8 @@ cache_aligned_unique_ptr<permit_manager> threading_control_impl::make_permit_man
32+
if (tcm_adaptor::is_initialized()) {
33+
auto tcm = make_cache_aligned_unique<tcm_adaptor>();
34+
if (tcm->is_connected()) {
35+
- return tcm;
36+
+ // Patch for GCC 4.8
37+
+ return cache_aligned_unique_ptr<permit_manager>{std::move(tcm)};
38+
}
39+
}
40+
return make_cache_aligned_unique<market>(workers_soft_limit);
41+
@@ -85,7 +86,8 @@ cache_aligned_unique_ptr<thread_dispatcher> threading_control_impl::make_thread_
42+
td->my_server->default_concurrency(), workers_soft_limit);
43+
}
44+
45+
- return td;
46+
+ // Patch for GCC 4.8
47+
+ return cache_aligned_unique_ptr<thread_dispatcher>{std::move(td)};
48+
}
49+
50+
threading_control_impl::threading_control_impl(threading_control* tc) {

ports/algorithm/tbb.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if(NOT TARGET TBB::tbb)
1616
project_third_party_port_declare(
1717
TBB
1818
VERSION
19-
"v2021.13.0"
19+
"v2022.0.0"
2020
GIT_URL
2121
"https://github.com/oneapi-src/oneTBB.git"
2222
BUILD_OPTIONS

ports/cares/c-ares.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if(NOT TARGET c-ares::cares
4242
project_third_party_port_declare(
4343
cares
4444
VERSION
45-
"1.33.1"
45+
"1.34.3"
4646
GIT_URL
4747
"https://github.com/c-ares/c-ares.git"
4848
BUILD_OPTIONS

ports/cares/cares-1.34.patch

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index f6560d5..cb7a215 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -242,6 +242,12 @@ ELSE ()
6+
CHECK_INCLUDE_FILES (netinet/tcp.h HAVE_NETINET_TCP_H)
7+
ENDIF ()
8+
9+
+IF (HAVE_SYS_TYPES_H)
10+
+ CHECK_INCLUDE_FILES ("sys/types.h;linux/tcp.h" HAVE_LINUX_TCP_H)
11+
+ELSE ()
12+
+ CHECK_INCLUDE_FILES (linux/tcp.h HAVE_LINUX_TCP_H)
13+
+ENDIF ()
14+
+
15+
# Include order matters for these windows files.
16+
# As cygwin environment has both socket.h and winsock2.h
17+
# headers check WIN32 not to include the later one here
18+
diff --git a/src/lib/ares_config.h.cmake b/src/lib/ares_config.h.cmake
19+
index 051b97f..510f545 100644
20+
--- a/src/lib/ares_config.h.cmake
21+
+++ b/src/lib/ares_config.h.cmake
22+
@@ -230,6 +230,9 @@
23+
/* Define to 1 if you have the <netinet/tcp.h> header file. */
24+
#cmakedefine HAVE_NETINET_TCP_H 1
25+
26+
+/* Define to 1 if you have the <linux/tcp.h> header file. */
27+
+#cmakedefine HAVE_LINUX_TCP_H 1
28+
+
29+
/* Define to 1 if you have the <net/if.h> header file. */
30+
#cmakedefine HAVE_NET_IF_H 1
31+
32+
diff --git a/src/lib/ares_socket.c b/src/lib/ares_socket.c
33+
index df02fd6..4b2359f 100644
34+
--- a/src/lib/ares_socket.c
35+
+++ b/src/lib/ares_socket.c
36+
@@ -31,7 +31,9 @@
37+
#ifdef HAVE_NETINET_IN_H
38+
# include <netinet/in.h>
39+
#endif
40+
-#ifdef HAVE_NETINET_TCP_H
41+
+#ifdef HAVE_LINUX_TCP_H
42+
+# include <linux/tcp.h>
43+
+#elif defined(HAVE_NETINET_TCP_H)
44+
# include <netinet/tcp.h>
45+
#endif
46+
#ifdef HAVE_NETDB_H

ports/grpc/grpc-v1.68.patch

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
diff --git a/src/core/util/per_cpu.h b/src/core/util/per_cpu.h
2+
index 69648aa..5094ccd 100644
3+
--- a/src/core/util/per_cpu.h
4+
+++ b/src/core/util/per_cpu.h
5+
@@ -82,7 +82,7 @@ class PerCpu {
6+
public:
7+
// Options are not defaulted to try and force consideration of what the
8+
// options specify.
9+
- explicit PerCpu(PerCpuOptions options) : shards_(options.Shards()) {}
10+
+ explicit PerCpu(PerCpuOptions options) : shards_(options.Shards()), data_{new T[options.Shards()]} {}
11+
12+
T& this_cpu() { return data_[sharding_helper_.GetShardingBits() % shards_]; }
13+
14+
@@ -94,7 +94,7 @@ class PerCpu {
15+
private:
16+
PerCpuShardingHelper sharding_helper_;
17+
const size_t shards_;
18+
- std::unique_ptr<T[]> data_{new T[shards_]};
19+
+ std::unique_ptr<T[]> data_;
20+
};
21+
22+
} // namespace grpc_core
23+
diff --git a/third_party/upb/upb/message/copy.c b/third_party/upb/upb/message/copy.c
24+
index 67e1b5b..94f4105 100644
25+
--- a/third_party/upb/upb/message/copy.c
26+
+++ b/third_party/upb/upb/message/copy.c
27+
@@ -150,7 +150,7 @@ upb_Array* upb_Array_DeepClone(const upb_Array* array, upb_CType value_type,
28+
for (size_t i = 0; i < size; ++i) {
29+
upb_MessageValue val = upb_Array_Get(array, i);
30+
if (!upb_Clone_MessageValue(&val, value_type, sub, arena)) {
31+
- return false;
32+
+ return NULL;
33+
}
34+
upb_Array_Set(cloned_array, i, val);
35+
}
36+
diff --git a/third_party/upb/upb/message/internal/message.c b/third_party/upb/upb/message/internal/message.c
37+
index 57ab2d7..45b1067 100644
38+
--- a/third_party/upb/upb/message/internal/message.c
39+
+++ b/third_party/upb/upb/message/internal/message.c
40+
@@ -17,9 +17,35 @@
41+
// Must be last.
42+
#include "upb/port/def.inc"
43+
44+
-const float kUpb_FltInfinity = INFINITY;
45+
-const double kUpb_Infinity = INFINITY;
46+
-const double kUpb_NaN = NAN;
47+
+// The latest win32 SDKs have an invalid definition of NAN.
48+
+// https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907
49+
+//
50+
+// Unfortunately, the `0.0 / 0.0` workaround doesn't work in Clang under C23, so
51+
+// try __builtin_nan first, if that exists.
52+
+#ifdef _WIN32
53+
+#ifdef __has_builtin
54+
+#if __has_builtin(__builtin_nan)
55+
+#define UPB_NAN __builtin_nan("0")
56+
+#endif
57+
+#if __has_builtin(__builtin_inf)
58+
+#define UPB_INFINITY __builtin_inf()
59+
+#endif
60+
+#endif
61+
+#ifndef UPB_NAN
62+
+#define UPB_NAN 0.0 / 0.0
63+
+#endif
64+
+#ifndef UPB_INFINITY
65+
+#define UPB_INFINITY 1.0 / 0.0
66+
+#endif
67+
+#else
68+
+// For !_WIN32, assume math.h works.
69+
+#define UPB_NAN NAN
70+
+#define UPB_INFINITY INFINITY
71+
+#endif
72+
+
73+
+const float kUpb_FltInfinity = UPB_INFINITY;
74+
+const double kUpb_Infinity = UPB_INFINITY;
75+
+const double kUpb_NaN = UPB_NAN;
76+
77+
bool UPB_PRIVATE(_upb_Message_Realloc)(struct upb_Message* msg, size_t need,
78+
upb_Arena* a) {
79+
diff --git a/third_party/upb/upb/text/internal/encode.c b/third_party/upb/upb/text/internal/encode.c
80+
index fc9cc6f..c58c2de 100644
81+
--- a/third_party/upb/upb/text/internal/encode.c
82+
+++ b/third_party/upb/upb/text/internal/encode.c
83+
@@ -25,7 +25,7 @@
84+
#define CHK(x) \
85+
do { \
86+
if (!(x)) { \
87+
- return false; \
88+
+ return NULL; \
89+
} \
90+
} while (0)
91+
92+
diff --git a/third_party/upb/upb/wire/internal/decoder.h b/third_party/upb/upb/wire/internal/decoder.h
93+
index 5ca1e1b..ea3eb2c 100644
94+
--- a/third_party/upb/upb/wire/internal/decoder.h
95+
+++ b/third_party/upb/upb/wire/internal/decoder.h
96+
@@ -17,7 +17,7 @@
97+
#include "upb/message/internal/message.h"
98+
#include "upb/wire/decode.h"
99+
#include "upb/wire/eps_copy_input_stream.h"
100+
-#include "utf8_range.h"
101+
+#include "../utf8_range/utf8_range.h"
102+
103+
// Must be last.
104+
#include "upb/port/def.inc"

ports/grpc/grpc.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ if(NOT TARGET gRPC::grpc++_alts
146146
set(ATFRAMEWORK_CMAKE_TOOLSET_THIRD_PARTY_GRPC_GRPC_VERSION "v1.58.1")
147147
endif()
148148
]]
149-
set(ATFRAMEWORK_CMAKE_TOOLSET_THIRD_PARTY_GRPC_GRPC_VERSION "v1.67.0")
149+
set(ATFRAMEWORK_CMAKE_TOOLSET_THIRD_PARTY_GRPC_GRPC_VERSION "v1.68.2")
150150
else()
151151
set(ATFRAMEWORK_CMAKE_TOOLSET_THIRD_PARTY_GRPC_GRPC_VERSION "v1.54.2")
152152
endif()

ports/gsl/gsl-lite.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if(NOT TARGET gsl::gsl-lite)
3434
project_third_party_port_declare(
3535
gsl-lite
3636
VERSION
37-
"v0.41.0"
37+
"v0.42.0"
3838
GIT_URL
3939
"https://github.com/gsl-lite/gsl-lite.git"
4040
BUILD_OPTIONS

ports/gsl/ms-gsl.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(NOT TARGET Microsoft.GSL::GSL)
1818
project_third_party_port_declare(
1919
Microsoft.GSL
2020
VERSION
21-
"v4.0.0"
21+
"v4.1.0"
2222
GIT_URL
2323
"https://github.com/microsoft/GSL.git"
2424
BUILD_OPTIONS

0 commit comments

Comments
 (0)