Find codegen backends in more locations
* Search in the sysroot passed using `--sysroot` in addition to the default sysroot. * Search for `librustc_codegen_$name.so` in addition to `librustc_codegen_$name-$release.so`.
This commit is contained in:
@@ -799,7 +799,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
|
||||
println!("host: {}", config::host_triple());
|
||||
println!("release: {}", unw(util::release_str()));
|
||||
if cfg!(feature = "llvm") {
|
||||
get_builtin_codegen_backend("llvm")().print_version();
|
||||
get_builtin_codegen_backend(&None, "llvm")().print_version();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1088,7 +1088,7 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
|
||||
|
||||
if cg_flags.iter().any(|x| *x == "passes=list") {
|
||||
if cfg!(feature = "llvm") {
|
||||
get_builtin_codegen_backend("llvm")().print_passes();
|
||||
get_builtin_codegen_backend(&None, "llvm")().print_passes();
|
||||
}
|
||||
return None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user