Skip to content

Commit

Permalink
Add test for PR rust-lang#80981, print cranelift version
Browse files Browse the repository at this point in the history
- Regression test added for rust-lang#80981
- -vV now prints cranelift version when cranelift backend is used
  • Loading branch information
osa1 committed Feb 12, 2021
1 parent e9920ef commit 4fe587c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_codegen_cranelift/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ impl CodegenBackend for CraneliftCodegenBackend {
}
}

fn print_version(&self) {
println!("Cranelift version: {}", cranelift_codegen::VERSION);
}

fn metadata_loader(&self) -> Box<dyn MetadataLoader + Sync> {
Box::new(crate::metadata::CraneliftMetadataLoader)
}
Expand Down
4 changes: 4 additions & 0 deletions src/test/run-make/codegen-version/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-include ../../run-make-fulldeps/tools.mk

all:
$(RUSTC) -vV | grep -P "LLVM version|Cranelift version"

0 comments on commit 4fe587c

Please sign in to comment.