Skip to content

Commit 22f669a

Browse files
Add abseil patch fix absl gcc ubsan constexpr bug (#28)
1 parent 706065f commit 22f669a

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed

.github/workflows/export.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- name: Export the recipes
3636
working-directory: recipes
3737
run: |
38+
conan export abseil/all --version=20250127.0
3839
conan export ed25519/all --version=2015.03
3940
conan export grpc/all --version=1.72.0
4041
conan export m4/all --version=1.4.19

recipes/abseil/all/conandata.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ sources:
2727
url: "https://github.com/abseil/abseil-cpp/archive/20230125.3.tar.gz"
2828
sha256: "5366D7E7FA7BA0D915014D387B66D0D002C03236448E1BA9EF98122C13B35C36"
2929
patches:
30+
"20250127.0":
31+
- patch_file: "patches/0001-fix-absl-gcc-ubsan-constexpr-bug.patch"
32+
patch_description: "Gcc ubsan constexpr compilation fix."
33+
patch_type: "bugfix"
34+
patch_source: "https://github.com/abseil/abseil-cpp/commit/60d1ce9911e6b32ea0c5a2fcfc120f9b392d5643"
3035
"20240722.1":
3136
- patch_file: "patches/0003-absl-string-libm-20240116.patch"
3237
patch_description: "link libm to absl string"
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
From 60d1ce9911e6b32ea0c5a2fcfc120f9b392d5643 Mon Sep 17 00:00:00 2001
2+
From: Derek Mauro <dmauro@google.com>
3+
Date: Tue, 7 Jan 2025 07:47:25 -0800
4+
Subject: [PATCH] Import of CCTZ from GitHub.
5+
6+
PiperOrigin-RevId: 712908937
7+
Change-Id: Ifdd783bb4415209a7241131feb79460adb360f64
8+
---
9+
absl/time/internal/cctz/BUILD.bazel | 15 ++++++++++++++-
10+
1 file changed, 14 insertions(+), 1 deletion(-)
11+
12+
diff --git a/absl/time/internal/cctz/BUILD.bazel b/absl/time/internal/cctz/BUILD.bazel
13+
index a2d9c336..da30a0f1 100644
14+
--- a/absl/time/internal/cctz/BUILD.bazel
15+
+++ b/absl/time/internal/cctz/BUILD.bazel
16+
@@ -12,6 +12,8 @@
17+
# See the License for the specific language governing permissions and
18+
# limitations under the License.
19+
20+
+load("//absl:copts/configure_copts.bzl", "ABSL_DEFAULT_COPTS", "ABSL_DEFAULT_LINKOPTS", "ABSL_TEST_COPTS")
21+
+
22+
package(features = [
23+
"header_modules",
24+
"layering_check",
25+
@@ -28,6 +30,8 @@ cc_library(
26+
hdrs = [
27+
"include/cctz/civil_time.h",
28+
],
29+
+ copts = ABSL_DEFAULT_COPTS,
30+
+ linkopts = ABSL_DEFAULT_LINKOPTS,
31+
textual_hdrs = ["include/cctz/civil_time_detail.h"],
32+
visibility = ["//visibility:public"],
33+
deps = ["//absl/base:config"],
34+
@@ -57,7 +61,8 @@ cc_library(
35+
"include/cctz/time_zone.h",
36+
"include/cctz/zone_info_source.h",
37+
],
38+
- linkopts = select({
39+
+ copts = ABSL_DEFAULT_COPTS,
40+
+ linkopts = ABSL_DEFAULT_LINKOPTS + select({
41+
"@platforms//os:osx": ["-Wl,-framework,CoreFoundation"],
42+
"@platforms//os:ios": ["-Wl,-framework,CoreFoundation"],
43+
"//conditions:default": [],
44+
@@ -84,6 +89,8 @@ cc_test(
45+
name = "civil_time_test",
46+
size = "small",
47+
srcs = ["src/civil_time_test.cc"],
48+
+ copts = ABSL_TEST_COPTS,
49+
+ linkopts = ABSL_DEFAULT_LINKOPTS,
50+
deps = [
51+
":civil_time",
52+
"//absl/base:config",
53+
@@ -96,7 +103,9 @@ cc_test(
54+
name = "time_zone_format_test",
55+
size = "small",
56+
srcs = ["src/time_zone_format_test.cc"],
57+
+ copts = ABSL_TEST_COPTS,
58+
data = [":zoneinfo"],
59+
+ linkopts = ABSL_DEFAULT_LINKOPTS,
60+
tags = [
61+
"no_test_android_arm",
62+
"no_test_android_arm64",
63+
@@ -117,7 +126,9 @@ cc_test(
64+
size = "small",
65+
timeout = "moderate",
66+
srcs = ["src/time_zone_lookup_test.cc"],
67+
+ copts = ABSL_TEST_COPTS,
68+
data = [":zoneinfo"],
69+
+ linkopts = ABSL_DEFAULT_LINKOPTS,
70+
tags = [
71+
"no_test_android_arm",
72+
"no_test_android_arm64",
73+
@@ -144,6 +155,8 @@ cc_test(
74+
"src/time_zone_info.h",
75+
"src/tzfile.h",
76+
],
77+
+ copts = ABSL_TEST_COPTS,
78+
+ linkopts = ABSL_DEFAULT_LINKOPTS,
79+
linkstatic = 1,
80+
tags = ["benchmark"],
81+
deps = [
82+
--
83+
2.43.0

0 commit comments

Comments
 (0)