From 95a365579608ae0428a2a8b77b65dbb38c3a5741 Mon Sep 17 00:00:00 2001 From: Rodrigo Queiro Date: Wed, 20 Nov 2019 13:59:59 +0100 Subject: [PATCH] Remove unnecessary `defines` The only macro referenced by the public headers is GOOGLE_GLOG_DLL_DECL. This means fewer defines are propagated to rules that depend on glog. --- bazel/glog.bzl | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/bazel/glog.bzl b/bazel/glog.bzl index 62d86d9..59eec38 100644 --- a/bazel/glog.bzl +++ b/bazel/glog.bzl @@ -118,15 +118,9 @@ def glog_library(namespace = "google", with_gflags = 1, **kwargs): name = "windows_glog_headers", hdrs = native.glob(["src/windows/glog/*.h"]), strip_include_prefix = "src/windows", - # TODO(rodrigoq): are these necessary? - # config.h for windows seem hardcoded that way, - # and we need to propagate those defines to binaries/libraries linking - # against glog. - defines = [ - "GOOGLE_GLOG_IS_A_DLL=1", - "GOOGLE_GLOG_DLL_DECL=__declspec(dllexport)", - "GOOGLE_GLOG_DLL_DECL_FOR_UNITTEST=__declspec(dllimport)", - ], + # We need to override the default GOOGLE_GLOG_DLL_DECL from + # src/windows/glog/*.h to match src/windows/config.h. + defines = ["GOOGLE_GLOG_DLL_DECL=__declspec(dllexport)"], deps = [":strip_include_prefix_hack"], )