From 31429d85b8ffad6027dcf821242687f3c6c85df9 Mon Sep 17 00:00:00 2001 From: Victor Zheng PhD Date: Mon, 11 Mar 2024 03:20:22 -0700 Subject: [PATCH] fix(bazel): add missing emscripten defines (#1082) --- bazel/glog.bzl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bazel/glog.bzl b/bazel/glog.bzl index 199fe01ed..a311d0d60 100644 --- a/bazel/glog.bzl +++ b/bazel/glog.bzl @@ -61,24 +61,28 @@ def glog_library(with_gflags = 1, **kwargs): "-DHAVE_SYS_UTSNAME_H", # For src/utilities.cc. "-DHAVE_SYS_TIME_H", + # NOTE: users could optionally patch -DHAVE_UNWIND off if + # stacktrace dumping is not needed "-DHAVE_UNWIND", # Enable dumping stacktrace upon sigaction. "-DHAVE_SIGACTION", # For logging.cc. "-DHAVE_PREAD", + # -DHAVE_MODE_T prevent repeated typedef mode_t leading + # to emcc compilation failure + "-DHAVE_MODE_T", + "-DHAVE_UNISTD_H", ] linux_or_darwin_copts = wasm_copts + [ "-DGLOG_EXPORT=__attribute__((visibility(\\\"default\\\")))", "-DGLOG_NO_EXPORT=__attribute__((visibility(\\\"default\\\")))", - "-DHAVE_MODE_T", "-DHAVE_POSIX_FADVISE", "-DHAVE_SSIZE_T", "-DHAVE_SYS_TYPES_H", # For src/utilities.cc. "-DHAVE_SYS_SYSCALL_H", # For src/logging.cc to create symlinks. - "-DHAVE_UNISTD_H", "-fvisibility-inlines-hidden", "-fvisibility=hidden", ]