mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-04-18 15:13:53 +02:00
print more compiler version info in CI
This commit is contained in:
parent
c5c07bb337
commit
11edfb76f3
|
@ -1,12 +1,27 @@
|
|||
fn main() {
|
||||
// Set in build.rs.
|
||||
let compiler_path = env!("COMPILER_PATH");
|
||||
use std::process::Command;
|
||||
|
||||
let mut compiler_command = std::process::Command::new(compiler_path);
|
||||
fn main() {
|
||||
// Print the rustc version.
|
||||
Command::new(env!("CARGO"))
|
||||
.args(&["rustc", "--quiet", "--", "--version"])
|
||||
.status()
|
||||
.unwrap();
|
||||
println!();
|
||||
|
||||
// Print the Cargo version.
|
||||
Command::new(env!("CARGO"))
|
||||
.args(&["--version"])
|
||||
.status()
|
||||
.unwrap();
|
||||
println!();
|
||||
|
||||
// Print the C compiler version. This relies on C compiler detection done
|
||||
// in build.rs, which sets the COMPILER_PATH variable.
|
||||
let compiler_path = env!("COMPILER_PATH");
|
||||
let mut compiler_command = Command::new(compiler_path);
|
||||
// Use the --version flag on everything other than MSVC.
|
||||
if !cfg!(target_env = "msvc") {
|
||||
compiler_command.arg("--version");
|
||||
}
|
||||
// Run the compiler to print its version. Ignore the exit status.
|
||||
let _ = compiler_command.status().unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue