From d262aecd68240846a7cdff758dc85d139887fe74 Mon Sep 17 00:00:00 2001 From: Andy Polyakov <9038069+dot-asm@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:18:38 +0100 Subject: [PATCH] Fix CUDA build with clang++. (#1273) --- .github/workflows/main.yml | 1 + src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2cf9ec99..3705a80b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -253,6 +253,7 @@ jobs: shell: bash run: | PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda + PATH="/usr/local/cuda/bin:$PATH" CXX=clang++ cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda msrv: name: MSRV diff --git a/src/lib.rs b/src/lib.rs index 11423cc8..f75b9511 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2093,7 +2093,7 @@ impl Build { // Pass `--target` with the LLVM target to properly // configure Clang even when cross-compiling. - cmd.args.push(format!("--target={llvm_target}").into()); + cmd.push_cc_arg(format!("--target={llvm_target}").into()); } } ToolFamily::Msvc { clang_cl } => {