aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gpus/cuda/build_defs.bzl.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/gpus/cuda/build_defs.bzl.tpl')
-rw-r--r--third_party/gpus/cuda/build_defs.bzl.tpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/gpus/cuda/build_defs.bzl.tpl b/third_party/gpus/cuda/build_defs.bzl.tpl
index a497ed98f0..ca8bbc1ee2 100644
--- a/third_party/gpus/cuda/build_defs.bzl.tpl
+++ b/third_party/gpus/cuda/build_defs.bzl.tpl
@@ -8,12 +8,14 @@ def if_cuda(if_true, if_false = []):
"""
return select({
"@local_config_cuda//cuda:using_nvcc": if_true,
+ "@local_config_cuda//cuda:using_clang": if_true,
"//conditions:default": if_false
})
+
def cuda_default_copts():
"""Default options for all CUDA compilations."""
- return if_cuda(["-x", "cuda", "-DGOOGLE_CUDA=1"])
+ return if_cuda(["-x", "cuda", "-DGOOGLE_CUDA=1"] + %{cuda_extra_copts})
def cuda_is_configured():