Skip to content

Commit

Permalink
Fix CUDA build with clang++. (#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm authored Nov 5, 2024
1 parent 8a62583 commit d262aec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 } => {
Expand Down

0 comments on commit d262aec

Please sign in to comment.