diff options
author | 2023-02-28 10:32:47 -0800 | |
---|---|---|
committer | 2023-02-28 10:34:04 -0800 | |
commit | cd43bea7779641790763f983f92683882749c647 (patch) | |
tree | 3a0bffc74c29afc520e2841f0653b398457f9c65 /absl | |
parent | 0c1114c4fb83c844c7fd74708338cca1d3d9b0dc (diff) |
Fix //absl/{base,debugging:symbolize} build with Mingw
PiperOrigin-RevId: 512974770
Change-Id: If7a8128996d2a73ac566faaa676ddd3858d51af6
Diffstat (limited to 'absl')
-rw-r--r-- | absl/BUILD.bazel | 19 | ||||
-rw-r--r-- | absl/base/BUILD.bazel | 4 | ||||
-rw-r--r-- | absl/debugging/BUILD.bazel | 4 |
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 = [ |