Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Commit 03c9249

Browse files
author
Peng Xiao
committed
bazel: Add HAVE_EXECINFO_H copts to fix empty stack trace
1 parent 9c3d6d0 commit 03c9249

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bazel/glog.bzl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
9898
"-D_GNU_SOURCE",
9999
]
100100

101+
linux_only_copts = [
102+
# For utilities.h.
103+
"-DHAVE_EXECINFO_H",
104+
]
105+
101106
darwin_only_copts = [
102107
# For stacktrace.
103108
"-DHAVE_DLADDR",
@@ -146,7 +151,7 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
146151
"@bazel_tools//src/conditions:darwin": common_copts + linux_or_darwin_copts + darwin_only_copts,
147152
"@bazel_tools//src/conditions:freebsd": common_copts + linux_or_darwin_copts + freebsd_only_copts,
148153
":wasm": common_copts + wasm_copts,
149-
"//conditions:default": common_copts + linux_or_darwin_copts,
154+
"//conditions:default": common_copts + linux_or_darwin_copts + linux_only_copts,
150155
}) + select({
151156
":clang-cl": clang_cl_only_copts,
152157
"//conditions:default": [],

0 commit comments

Comments
 (0)