Skip to content

Commit d262aec

Browse files
authored
Fix CUDA build with clang++. (#1273)
1 parent 8a62583 commit d262aec

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ jobs:
253253
shell: bash
254254
run: |
255255
PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda
256+
PATH="/usr/local/cuda/bin:$PATH" CXX=clang++ cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda
256257
257258
msrv:
258259
name: MSRV

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2093,7 +2093,7 @@ impl Build {
20932093

20942094
// Pass `--target` with the LLVM target to properly
20952095
// configure Clang even when cross-compiling.
2096-
cmd.args.push(format!("--target={llvm_target}").into());
2096+
cmd.push_cc_arg(format!("--target={llvm_target}").into());
20972097
}
20982098
}
20992099
ToolFamily::Msvc { clang_cl } => {

0 commit comments

Comments
 (0)