Skip to content

Commit 981d1f8

Browse files
authored
🩹 Fix *_nvptx toolchains after bf16e6a (#261)
1 parent 0f32482 commit 981d1f8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ll/args.bzl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@ def compile_object_args(
228228
"cuda_nvptx",
229229
"hip_nvptx",
230230
]:
231+
# Enable the use of libc++ for the clang-based device compilation.
232+
# This is only used with the clang-based device compilation. The
233+
# cuda_nvptx_nvcc toolchain uses libstdc++ from Nix.
234+
args.add("-D_ALLOW_UNSUPPORTED_LIBCPP")
235+
231236
args.add("-Wno-unknown-cuda-version") # Will always be unknown.
232237
args.add("-xcuda")
233238
if toolchain.LL_CUDA_TOOLKIT != "":
@@ -528,8 +533,8 @@ def link_executable_args(ctx, in_files, out_file, mode):
528533
args.add(toolchain.LL_CUDA_TOOLKIT, format = "-L%s/lib/stubs")
529534

530535
args.add("-lcuda")
531-
args.add("-lcudart_static")
532-
args.add("-lcupti_static")
536+
args.add("-lcudart")
537+
args.add("-lcupti")
533538
if ctx.attr.compilation_mode == "hip_amdgpu":
534539
args.add(toolchain.hip_runtime[0].dirname, format = "-L%s")
535540
args.add(toolchain.hip_runtime[0].basename, format = "-l:%s")

0 commit comments

Comments
 (0)