Merge pull request #3602 from yesudeep:try-fix-linker-errors-on-freebsd

PiperOrigin-RevId: 402414489
This commit is contained in:
Andy Soffer 2021-10-13 12:28:06 -04:00
commit dc7a0779d1

View File

@ -46,6 +46,16 @@ config_setting(
constraint_values = ["@platforms//os:windows"],
)
config_setting(
name = "freebsd",
constraint_values = ["@platforms//os:freebsd"],
)
config_setting(
name = "openbsd",
constraint_values = ["@platforms//os:openbsd"],
)
config_setting(
name = "msvc_compiler",
flag_values = {
@ -110,6 +120,8 @@ cc_library(
linkopts = select({
":qnx": ["-lregex"],
":windows": [],
":freebsd": ["-lm", "-pthread"],
":openbsd": ["-lm", "-pthread"],
"//conditions:default": ["-pthread"],
}),
deps = select({