aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gpus/cuda/BUILD.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/gpus/cuda/BUILD.tpl')
-rw-r--r--third_party/gpus/cuda/BUILD.tpl12
1 files changed, 10 insertions, 2 deletions
diff --git a/third_party/gpus/cuda/BUILD.tpl b/third_party/gpus/cuda/BUILD.tpl
index 8754105619..e101f9fbd8 100644
--- a/third_party/gpus/cuda/BUILD.tpl
+++ b/third_party/gpus/cuda/BUILD.tpl
@@ -33,6 +33,12 @@ config_setting(
visibility = ["//visibility:public"],
)
+config_setting(
+ name = "freebsd",
+ values = {"cpu": "freebsd"},
+ visibility = ["//visibility:public"],
+)
+
cc_library(
name = "cuda_headers",
hdrs = glob([
@@ -49,8 +55,10 @@ cc_library(
name = "cudart_static",
srcs = ["lib/%{cudart_static_lib}"],
includes = ["include/"],
- linkopts = [
- "-ldl",
+ linkopts = select({
+ ":freebsd": [],
+ "//conditions:default": ["-ldl"],
+ }) + [
"-lpthread",
%{cudart_static_linkopt}
],