diff options
author | Yesudeep Mangalapilly <yesudeep@gmail.com> | 2021-10-08 15:55:39 (GMT) |
---|---|---|
committer | Yesudeep Mangalapilly <yesudeep@gmail.com> | 2021-10-08 15:55:39 (GMT) |
commit | 9e3fb4ea940ee67bb4669cc199db7b575bf34f69 (patch) | |
tree | 6cd2a72e448e61241fe70a270e74bf042d232782 | |
parent | 075810f7a20405ea09a93f68847d6e963212fa62 (diff) | |
download | googletest-9e3fb4ea940ee67bb4669cc199db7b575bf34f69.zip googletest-9e3fb4ea940ee67bb4669cc199db7b575bf34f69.tar.gz googletest-9e3fb4ea940ee67bb4669cc199db7b575bf34f69.tar.bz2 |
Fix linker errors on FreeBSD.refs/pull/3602/head
-rw-r--r-- | BUILD.bazel | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/BUILD.bazel b/BUILD.bazel index 3b25878..1df5ff5 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -47,6 +47,16 @@ config_setting( ) 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 = { "@bazel_tools//tools/cpp:compiler": "msvc-cl", @@ -110,6 +120,8 @@ cc_library( linkopts = select({ ":qnx": ["-lregex"], ":windows": [], + ":freebsd": ["-lm", "-pthread"], + ":openbsd": ["-lm", "-pthread"], "//conditions:default": ["-pthread"], }), deps = select({ |