diff --git a/BUILD b/BUILD index 0e7ccdd..0276301 100644 --- a/BUILD +++ b/BUILD @@ -11,6 +11,13 @@ config_setting( values = {"cpu": "x64_windows"}, ) +config_setting( + name = "gflags_debug_build", + values = { + "compilation_mode": "dbg", + }, +) + load(":bazel/gflags.bzl", "gflags_sources", "gflags_library") (hdrs, srcs) = gflags_sources(namespace=["gflags", "google"]) diff --git a/bazel/gflags.bzl b/bazel/gflags.bzl index 70afd35..1c94bd4 100644 --- a/bazel/gflags.bzl +++ b/bazel/gflags.bzl @@ -92,12 +92,6 @@ def gflags_library(hdrs=[], srcs=[], threads=1): else: name += "_nothreads" copts += ["-DNO_THREADS"] - native.config_setting( - name = "gflags_debug_build", - values = { - "compilation_mode": "dbg", - }, - ) native.cc_library( name = name, hdrs = hdrs, @@ -105,7 +99,7 @@ def gflags_library(hdrs=[], srcs=[], threads=1): copts = copts, linkopts = linkopts, defines = select({ - ":gflags_debug_build": ["GFLAGS_DEBUG_BUILD"], + "//:gflags_debug_build": ["GFLAGS_DEBUG_BUILD"], "//conditions:default": [] }), visibility = ["//visibility:public"],