Skip to content

Commit 3f72f48

Browse files
authored
fix: fix clang detection on windows (#369)
1 parent 76cb0a6 commit 3f72f48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cuda/private/template_helper.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _generate_toolchain_clang_build(repository_ctx, cuda, clang_path_or_label):
166166
compiler_use_cc_toolchain_env = repository_ctx.os.environ.get("CUDA_COMPILER_USE_CC_TOOLCHAIN", "false")
167167
if compiler_use_cc_toolchain_env == "true":
168168
compiler_attr_line = "compiler_use_cc_toolchain = True,"
169-
elif clang_path_or_label.startswith("//") or clang_path_or_label.startswith("@"):
169+
elif clang_path_or_label != None and (clang_path_or_label.startswith("//") or clang_path_or_label.startswith("@")):
170170
# Use compiler_label
171171
compiler_attr_line = 'compiler_label = "%{{clang_label}}",'
172172
clang_label_for_subst = clang_path_or_label

0 commit comments

Comments
 (0)