Skip to content

Commit 91ba94a

Browse files
committed
Try again
1 parent 0c70fea commit 91ba94a

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/compiletests/src/main.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use clap::Parser;
22
use itertools::Itertools as _;
3-
use rustc_codegen_spirv_target_specs::TARGET_SPEC_DIR_PATH;
43
use std::{
54
env, io,
65
path::{Path, PathBuf},
@@ -30,10 +29,6 @@ impl Opt {
3029

3130
const CUDA_TARGET_SUFFIX: &str = "-nvidia-cuda";
3231

33-
fn target_spec_json(target: &str) -> String {
34-
format!("{TARGET_SPEC_DIR_PATH}/{target}.json")
35-
}
36-
3732
#[derive(Copy, Clone)]
3833
enum DepKind {
3934
CudaLib,
@@ -171,7 +166,7 @@ impl Runner {
171166
stage_id,
172167
target_rustcflags: Some(flags),
173168
mode: mode.parse().expect("Invalid mode"),
174-
target: target_spec_json(&target),
169+
target,
175170
src_base: self.tests_dir.join(mode),
176171
build_base: self.compiletest_build_dir.clone(),
177172
bless: self.opt.bless,
@@ -194,9 +189,9 @@ fn build_deps(deps_target_dir: &Path, codegen_backend_path: &Path, target: &str)
194189
"build",
195190
"-p",
196191
"compiletests-deps-helper",
197-
"-Zbuild-std=core",
192+
"-Zbuild-std=core,alloc",
198193
"-Zbuild-std-features=compiler-builtins-mem",
199-
&*format!("--target={}", target_spec_json(target)),
194+
&*format!("--target={}", target),
200195
])
201196
.arg("--target-dir")
202197
.arg(deps_target_dir)
@@ -352,9 +347,12 @@ fn rust_flags(codegen_backend_path: &Path) -> String {
352347
&*format!("-Zcodegen-backend={}", codegen_backend_path.display()),
353348
"-Zcrate-attr=feature(register_tool)",
354349
"-Zcrate-attr=register_tool(nvvm_internal)".into(),
355-
// NOTE(LegNeato) flags copied from `cuda-builder` are all above this line.
356350
"-Zcrate-attr=no_std".into(),
357351
"-Zsaturating_float_casts=false".into(),
352+
// TODO(RDambrosio016): Remove this once we can get meaningful error messages in panic to work.
353+
// for now we enable it to remove some useless indirect calls in the ptx.
354+
"-Zbuild-std-features=panic_immediate_abort".into(),
355+
// NOTE(LegNeato) flags copied from `cuda-builder` are all above this line.
358356
// NOTE(LegNeato) flags copied from `rust-gpu`'s compiletests are all below this
359357
// line.
360358
// Ensure the codegen backend is emitted in `.d` files to force Cargo

0 commit comments

Comments
 (0)