2020-08-27 22:58:48 -05:00
|
|
|
[package]
|
|
|
|
name = "rustc_codegen_ssa"
|
|
|
|
version = "0.0.0"
|
2021-09-19 11:49:55 -05:00
|
|
|
edition = "2021"
|
2020-08-27 22:58:48 -05:00
|
|
|
|
|
|
|
[lib]
|
|
|
|
test = false
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
bitflags = "1.2.1"
|
2021-07-13 03:58:50 -05:00
|
|
|
cc = "1.0.69"
|
2022-03-04 11:54:28 -06:00
|
|
|
itertools = "0.10.1"
|
2020-08-27 22:58:48 -05:00
|
|
|
tracing = "0.1"
|
|
|
|
libc = "0.2.50"
|
2021-04-21 15:02:54 -05:00
|
|
|
jobserver = "0.1.22"
|
2021-04-23 17:33:09 -05:00
|
|
|
tempfile = "3.2"
|
2022-01-20 08:09:05 -06:00
|
|
|
thorin-dwp = "0.2"
|
2020-08-27 22:58:48 -05:00
|
|
|
pathdiff = "0.2.0"
|
Use object crate for .rustc metadata generation
We already use the object crate for generating uncompressed .rmeta
metadata object files. This switches the generation of compressed
.rustc object files to use the object crate as well. These have
slightly different requirements in that .rmeta should be completely
excluded from any final compilation artifacts, while .rustc should
be part of shared objects, but not loaded into memory.
The primary motivation for this change is #90326: In LLVM 14, the
current way of setting section flags (and in particular, preventing
the setting of SHF_ALLOC) will no longer work. There are other ways
we could work around this, but switching to the object crate seems
like the most elegant, as we already use it for .rmeta, and as it
makes this independent of the codegen backend. In particular, we
don't need separate handling in codegen_llvm and codegen_gcc.
codegen_cranelift should be able to reuse the implementation as
well, though I have omitted that here, as it is not based on
codegen_ssa.
This change mostly extracts the existing code for .rmeta handling
to allow using it for .rustc as well, and adjust the codegen
infrastructure to handle the metadata object file separately: We
no longer create a backend-specific module for it, and directly
produce the compiled module instead.
This does not fix #90326 by itself yet, as .llvmbc will need to be
handled separately.
2021-12-02 05:24:25 -06:00
|
|
|
snap = "1"
|
2021-07-14 08:50:42 -05:00
|
|
|
smallvec = { version = "1.6.1", features = ["union", "may_dangle"] }
|
2021-07-30 14:18:14 -05:00
|
|
|
regex = "1.4"
|
2020-08-27 22:58:48 -05:00
|
|
|
|
|
|
|
rustc_serialize = { path = "../rustc_serialize" }
|
2021-12-03 08:24:05 -06:00
|
|
|
rustc_arena = { path = "../rustc_arena" }
|
2020-08-27 22:58:48 -05:00
|
|
|
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" }
|
2021-05-24 17:34:12 -05:00
|
|
|
rustc_data_structures = { path = "../rustc_data_structures" }
|
2020-08-27 22:58:48 -05:00
|
|
|
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" }
|
2021-09-24 11:15:36 -05:00
|
|
|
rustc_metadata = { path = "../rustc_metadata" }
|
2020-11-14 09:48:54 -06:00
|
|
|
rustc_query_system = { path = "../rustc_query_system" }
|
2020-08-27 22:58:48 -05:00
|
|
|
rustc_target = { path = "../rustc_target" }
|
|
|
|
rustc_session = { path = "../rustc_session" }
|
2021-05-07 11:57:22 -05:00
|
|
|
|
|
|
|
[dependencies.object]
|
2022-01-06 23:32:58 -06:00
|
|
|
version = "0.28.0"
|
2021-05-07 11:57:22 -05:00
|
|
|
default-features = false
|
2021-04-22 13:53:33 -05:00
|
|
|
features = ["read_core", "elf", "macho", "pe", "unaligned", "archive", "write"]
|