1
Fork 0

Revert "Update libc and libloading"

This reverts commit bfcf97bd83.

It causes a "can't resolve symbol" crash on macOS
This commit is contained in:
bjorn3 2021-02-09 13:19:19 +01:00
parent bfcf97bd83
commit c5dff34ae9
3 changed files with 6 additions and 6 deletions

8
Cargo.lock generated
View file

@ -206,15 +206,15 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.86" version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3"
[[package]] [[package]]
name = "libloading" name = "libloading"
version = "0.7.0" version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"winapi", "winapi",

View file

@ -20,7 +20,7 @@ object = { version = "0.23.0", default-features = false, features = ["std", "rea
ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" } ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" }
indexmap = "1.0.2" indexmap = "1.0.2"
libloading = { version = "0.7.0", optional = true } libloading = { version = "0.6.0", optional = true }
smallvec = "1.6.1" smallvec = "1.6.1"
# Uncomment to use local checkout of cranelift # Uncomment to use local checkout of cranelift

View file

@ -210,7 +210,7 @@ fn load_imported_symbols_for_jit(tcx: TyCtxt<'_>) -> Vec<(String, *const u8)> {
let mut imported_symbols = Vec::new(); let mut imported_symbols = Vec::new();
for path in dylib_paths { for path in dylib_paths {
use object::{Object, ObjectSymbol}; use object::{Object, ObjectSymbol};
let lib = unsafe { libloading::Library::new(&path).unwrap() }; let lib = libloading::Library::new(&path).unwrap();
let obj = std::fs::read(path).unwrap(); let obj = std::fs::read(path).unwrap();
let obj = object::File::parse(&obj).unwrap(); let obj = object::File::parse(&obj).unwrap();
imported_symbols.extend(obj.dynamic_symbols().filter_map(|symbol| { imported_symbols.extend(obj.dynamic_symbols().filter_map(|symbol| {