diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs index 170750461cace..af7f410096548 100644 --- a/compiler/rustc_codegen_cranelift/src/lib.rs +++ b/compiler/rustc_codegen_cranelift/src/lib.rs @@ -231,6 +231,10 @@ impl CodegenBackend for CraneliftCodegenBackend { } } + fn print_version(&self) { + println!("Cranelift version: {}", cranelift_codegen::VERSION); + } + fn metadata_loader(&self) -> Box { Box::new(crate::metadata::CraneliftMetadataLoader) } diff --git a/src/test/run-make/codegen-version/Makefile b/src/test/run-make/codegen-version/Makefile new file mode 100644 index 0000000000000..11201053a7f69 --- /dev/null +++ b/src/test/run-make/codegen-version/Makefile @@ -0,0 +1,4 @@ +-include ../../run-make-fulldeps/tools.mk + +all: + $(RUSTC) -vV | grep -P "LLVM version|Cranelift version"