Fix linker errors on FreeBSD.

This commit is contained in:
Yesudeep Mangalapilly 2021-10-08 08:55:39 -07:00
parent 075810f7a2
commit 9e3fb4ea94

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({