summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--absl/BUILD.bazel19
-rw-r--r--absl/base/BUILD.bazel4
-rw-r--r--absl/debugging/BUILD.bazel4
3 files changed, 26 insertions, 1 deletions
diff --git a/absl/BUILD.bazel b/absl/BUILD.bazel
index 69bdbf14..b2300ba9 100644
--- a/absl/BUILD.bazel
+++ b/absl/BUILD.bazel
@@ -36,7 +36,7 @@ config_setting(
)
config_setting(
- name = "mingw_compiler",
+ name = "mingw_unspecified_compiler",
flag_values = {
"@bazel_tools//tools/cpp:compiler": "mingw",
},
@@ -44,6 +44,14 @@ config_setting(
)
config_setting(
+ name = "mingw-gcc_compiler",
+ flag_values = {
+ "@bazel_tools//tools/cpp:compiler": "mingw-gcc",
+ },
+ visibility = [":__subpackages__"],
+)
+
+config_setting(
name = "msvc_compiler",
flag_values = {
"@bazel_tools//tools/cpp:compiler": "msvc-cl",
@@ -131,3 +139,12 @@ config_setting(
},
visibility = [":__subpackages__"],
)
+
+selects.config_setting_group(
+ name = "mingw_compiler",
+ match_any = [
+ ":mingw_unspecified_compiler",
+ ":mingw-gcc_compiler",
+ ],
+ visibility = [":__subpackages__"],
+)
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
index dd29daf6..28cbf28f 100644
--- a/absl/base/BUILD.bazel
+++ b/absl/base/BUILD.bazel
@@ -246,6 +246,10 @@ cc_library(
"//absl:clang-cl_compiler": [
"-DEFAULTLIB:advapi32.lib",
],
+ "//absl:mingw_compiler": [
+ "-DEFAULTLIB:advapi32.lib",
+ "-ladvapi32",
+ ],
"//absl:wasm": [],
"//conditions:default": ["-pthread"],
}) + ABSL_DEFAULT_LINKOPTS,
diff --git a/absl/debugging/BUILD.bazel b/absl/debugging/BUILD.bazel
index edbb3698..86063da2 100644
--- a/absl/debugging/BUILD.bazel
+++ b/absl/debugging/BUILD.bazel
@@ -83,6 +83,10 @@ cc_library(
linkopts = ABSL_DEFAULT_LINKOPTS + select({
"//absl:msvc_compiler": ["-DEFAULTLIB:dbghelp.lib"],
"//absl:clang-cl_compiler": ["-DEFAULTLIB:dbghelp.lib"],
+ "//absl:mingw_compiler": [
+ "-DEFAULTLIB:dbghelp.lib",
+ "-ldbghelp",
+ ],
"//conditions:default": [],
}),
deps = [