diff --git a/BUILD.bazel b/BUILD.bazel index 3b25878a..1df5ff5f 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -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({