75da570d78
Use the object crate for metadata reading This allows sharing the metadata reader between cg_llvm, cg_clif and other codegen backends. This is not currently useful for rlib reading with cg_spirv ([rust-gpu](https://github.com/EmbarkStudios/rust-gpu/)) as it uses tar rather than ar as .rlib format, but it is useful for dylib reading required for loading proc macros. (cc `@eddyb)` The object crate is already trusted as dependency of libstd through backtrace. As far as I know it supports reading all object file formats used by targets for which we support rust dylibs with crate metadata, but I am not certain. If this happens to not be the case, I could keep using LLVM for reading dylib metadata. Marked as WIP for a perf run and as it is based on #83637.
41 lines
1.1 KiB
TOML
41 lines
1.1 KiB
TOML
[package]
|
|
authors = ["The Rust Project Developers"]
|
|
name = "rustc_codegen_ssa"
|
|
version = "0.0.0"
|
|
edition = "2018"
|
|
|
|
[lib]
|
|
test = false
|
|
|
|
[dependencies]
|
|
bitflags = "1.2.1"
|
|
cc = "1.0.67"
|
|
itertools = "0.9"
|
|
tracing = "0.1"
|
|
libc = "0.2.50"
|
|
jobserver = "0.1.22"
|
|
tempfile = "3.2"
|
|
pathdiff = "0.2.0"
|
|
|
|
rustc_serialize = { path = "../rustc_serialize" }
|
|
rustc_ast = { path = "../rustc_ast" }
|
|
rustc_span = { path = "../rustc_span" }
|
|
rustc_middle = { path = "../rustc_middle" }
|
|
rustc_apfloat = { path = "../rustc_apfloat" }
|
|
rustc_attr = { path = "../rustc_attr" }
|
|
rustc_symbol_mangling = { path = "../rustc_symbol_mangling" }
|
|
rustc_data_structures = { path = "../rustc_data_structures"}
|
|
rustc_errors = { path = "../rustc_errors" }
|
|
rustc_fs_util = { path = "../rustc_fs_util" }
|
|
rustc_hir = { path = "../rustc_hir" }
|
|
rustc_incremental = { path = "../rustc_incremental" }
|
|
rustc_index = { path = "../rustc_index" }
|
|
rustc_macros = { path = "../rustc_macros" }
|
|
rustc_target = { path = "../rustc_target" }
|
|
rustc_session = { path = "../rustc_session" }
|
|
|
|
[dependencies.object]
|
|
version = "0.22.0"
|
|
default-features = false
|
|
features = ["read_core", "elf", "macho", "pe", "unaligned", "archive"]
|