Skip to content

Commit

Permalink
fix bazel build for freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
dfr authored and drigz committed Mar 25, 2020
1 parent 28321d8 commit 3ba8976
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bazel/glog.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
"-I%s/glog_internal" % gendir,
]

freebsd_only_copts = [
# Enable declaration of _Unwind_Backtrace
"-D_GNU_SOURCE",
]

darwin_only_copts = [
# For stacktrace.
"-DHAVE_DLADDR",
Expand Down Expand Up @@ -99,6 +104,7 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs):
select({
"@bazel_tools//src/conditions:windows": common_copts + windows_only_copts,
"@bazel_tools//src/conditions:darwin": common_copts + linux_or_darwin_copts + darwin_only_copts,
"@bazel_tools//src/conditions:freebsd": common_copts + linux_or_darwin_copts + freebsd_only_copts,
"//conditions:default": common_copts + linux_or_darwin_copts,
}),
deps = [
Expand Down

0 comments on commit 3ba8976

Please sign in to comment.