about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/Cargo.toml
AgeCommit message (Collapse)AuthorLines
2023-12-03compiler: replace cstr macro with c str literals in compiler and few other c ↵klensy-1/+0
str replacements
2023-11-22Update itertools to 0.11.Nicholas Nethercote-1/+1
Because the API for `with_position` improved in 0.11 and I want to use it.
2023-10-30Clean up `rustc_*/Cargo.toml`.Nicholas Nethercote-9/+8
- Sort dependencies and features sections. - Add `tidy` markers to the sorted sections so they stay sorted. - Remove empty `[lib`] sections. - Remove "See more keys..." comments. Excluded files: - rustc_codegen_{cranelift,gcc}, because they're external. - rustc_lexer, because it has external use. - stable_mir, because it has external use.
2023-10-22coverage: Build the global file table ahead of timeZalathar-0/+1
2023-08-14Upgrade Object and related depsdirreke-1/+1
2023-07-05Revert "use new c literals instead of cstr! macro"León Orell Valerian Liehr-0/+1
This reverts commit a17561ffc90c900cb7d0e96b00c6381244764ef7.
2023-05-31use new c literals instead of cstr! macroklensy-1/+0
2023-05-10Bump object and thorin-dwpJubilee Young-1/+1
object -> 0.31.1 thorin-dwp -> 0.6.0 Required to fix watchOS breakage.
2023-04-22drop unused deps, gate libc under unix for one crateklensy-1/+0
2023-04-18Add `rustc_fluent_macro` to decouple fluent from `rustc_macros`Nilstrieb-0/+1
Fluent, with all the icu4x it brings in, takes quite some time to compile. `fluent_messages!` is only needed in further downstream rustc crates, but is blocking more upstream crates like `rustc_index`. By splitting it out, we allow `rustc_macros` to be compiled earlier, which speeds up `x check compiler` by about 5 seconds (and even more after the needless dependency on `serde_json` is removed from `rustc_data_structures`).
2023-02-25record llvm cgu instruction statscsmoe-0/+2
2023-02-06remove unused importsklensy-1/+0
2023-01-09Fix aarch64-unknown-linux-gnu_ilp32 targetAmanieu d'Antras-1/+4
This was broken because the synthetic object files produced by rustc were for 64-bit AArch64, which caused link failures when combined with 32-bit ILP32 object files. This PR updates the object crate to 0.30.1 which adds support for generating ILP32 AArch64 object files.
2022-11-26Rewrite LLVM's archive writer in Rustbjorn3-1/+1
This allows it to be used by other codegen backends
2022-10-06Auto merge of #99324 - reez12g:issue-99144, r=jyn514bors-1/+0
Enable doctests in compiler/ crates Helps with https://github.com/rust-lang/rust/issues/99144
2022-10-04resolve error when attempting to link a universal library on macOSAlex Gaynor-0/+1
Previously attempting to link universal libraries into libraries (but not binaries) would produce an error that "File too small to be an archive". This works around this by using `object` to extract a library for the target platform when passed a univeral library. Fixes #55235
2022-09-29Remove from compiler/ cratesreez12g-1/+0
2022-09-18Remove support for LLVM's legacy pass managerJosh Stone-1/+0
2022-07-25Use object instead of LLVM for reading bitcode from rlibsbjorn3-0/+1
2022-07-23Add fine-grained LLVM CFI support to the Rust compilerRamon de C Valle-1/+1
This commit improves the LLVM Control Flow Integrity (CFI) support in the Rust compiler by providing forward-edge control flow protection for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue #89653). LLVM CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto).
2022-06-27Update `smallvec` to 1.8.1.Nicholas Nethercote-1/+1
This pulls in https://github.com/servo/rust-smallvec/pull/282, which gives some small wins for rustc.
2022-06-15Rollup merge of #98067 - klensy:compiler-deps2, r=Dylan-DPCYuki Okushi-1/+0
compiler: remove unused deps Removed unused dependencies in compiler crates and moves few `libc` under `target.cfg(unix)` .
2022-06-14Add metadata generation for vtables when using VFEflip1995-0/+1
This adds the typeid and `vcall_visibility` metadata to vtables when the -Cvirtual-function-elimination flag is set. The typeid is generated in the same way as for the `llvm.type.checked.load` intrinsic from the trait_ref. The offset that is added to the typeid is always 0. This is because LLVM assumes that vtables are constructed according to the definition in the Itanium ABI. This includes an "address point" of the vtable. In C++ this is the offset in the vtable where information for RTTI is placed. Since there is no RTTI information in Rust's vtables, this "address point" is always 0. This "address point" in combination with the offset passed to the `llvm.type.checked.load` intrinsic determines the final function that should be loaded from the vtable in the `WholeProgramDevirtualization` pass in LLVM. That's why the `llvm.type.checked.load` intrinsics are generated with the typeid of the trait, rather than with that of the function that is called. This matches what `clang` does for C++. The vcall_visibility metadata depends on three factors: 1. LTO level: Currently this is always fat LTO, because LLVM only supports this optimization with fat LTO. 2. Visibility of the trait: If the trait is publicly visible, VFE can only act on its vtables after linking. 3. Number of CGUs: if there is more than one CGU, also vtables with restricted visibility could be seen outside of the CGU, so VFE can only act on them after linking. To reflect this, there are three visibility levels: Public, LinkageUnit, and TranslationUnit.
2022-06-13remove currently unused depsklensy-1/+0
2022-02-21debuginfo: Simplify TypeMap used during LLVM debuginfo generation.Michael Woerister-0/+1
The previous implementation was written before types were properly normalized for code generation and had to assume a more complicated relationship between types and their debuginfo -- generating separate identifiers for debuginfo nodes that were based on normalized types. Since types are now already normalized, we can use them as identifiers for debuginfo nodes.
2021-12-12Auto merge of #90716 - euclio:libloading, r=cjgillotbors-0/+1
replace dynamic library module with libloading This PR deletes the `rustc_metadata::dynamic_lib` module in favor of the popular and better tested [`libloading` crate](https://github.com/nagisa/rust_libloading/). We don't benefit from `libloading`'s symbol lifetimes since we end up leaking the loaded library in all cases, but the call-sites look much nicer by improving error handling and abstracting away some transmutes. We also can remove `rustc_metadata`'s direct dependencies on `libc` and `winapi`. This PR also adds an exception for `libloading` (and its license) to tidy, so this will need sign-off from the compiler team.
2021-12-07Use object crate for .rustc metadata generationNikita Popov-1/+0
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-06replace dynamic library module with libloadingAndy Russell-0/+1
2021-10-07Update to measureme v10Ryan Levick-1/+1
2021-10-07Add support for artifact size profilingRyan Levick-1/+1
2021-10-03Remove re-export.Camille GILLOT-0/+1
2021-09-20Migrate to 2021Mark Rousskov-1/+1
2021-09-13Use a separate interner type for UniqueTypeIdbjorn3-0/+1
Using symbol::Interner makes it very easy to mixup UniqueTypeId symbols with the global interner. In fact the Debug implementation of UniqueTypeId did exactly this. Using a separate interner type also avoids prefilling the interner with unused symbols and allow for optimizing the symbol interner for parallel access without negatively affecting the single threaded module codegen.
2021-08-24Update rustc-demangle to 0.1.21.Eduard-Mihai Burtescu-1/+1
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-06-25rustc_codegen_llvm: Remove unused dependency rustc_incrementalJosh Triplett-1/+0
Unused since commit f141acf0678139ac31375d02feebcc2be220715b ("Move finalize_session_directory call out of cg_llvm").
2021-06-25rustc_codegen_llvm: Remove unused dependency rustc_featureJosh Triplett-1/+0
Unused since commit 622c48e4f1a5bc3727f8ead89767c8a9e367a77e ("Allow making `RUSTC_BOOTSTRAP` conditional on the crate name").
2021-06-01Drop metadata_encoding_version.Camille GILLOT-0/+1
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-1/+0
2021-05-30Drop metadata_encoding_version.Camille GILLOT-0/+1
2021-02-27Rollup merge of #82537 - wesleywiser:update_measureme, r=oli-obkDylan DPC-1/+1
Update measureme dependency to the latest version This version adds the ability to use `rdpmc` hardware-based performance counters instead of wall-clock time for measuring duration. This also introduces a dependency on the `perf-event-open-sys` crate on Linux which is used when using hardware counters. r? ```@oli-obk```
2021-02-27Rollup merge of #82057 - upsuper-forks:cstr, r=davidtwco,wesleywiserDylan DPC-0/+1
Replace const_cstr with cstr crate This PR replaces the `const_cstr` macro inside `rustc_data_structures` with `cstr` macro from [cstr](https://crates.io/crates/cstr) crate. The two macros basically serve the same purpose, which is to generate `&'static CStr` from a string literal. `cstr` is better because it validates the literal at compile time, while the existing `const_cstr` does it at runtime when `debug_assertions` is enabled. In addition, the value `cstr` generates can be used in constant context (which is seemingly not needed anywhere currently, though).
2021-02-25Update measureme dependency to the latest versionWesley Wiser-1/+1
This version adds the ability to use `rdpmc` hardware-based performance counters instead of wall-clock time for measuring duration. This also introduces a dependency on the `perf-event-open-sys` crate on Linux which is used when using hardware counters.
2021-02-14bumped smallvec depsklensy-1/+1
2021-02-14Replace const_cstr with cstr crateXidorn Quan-0/+1
2020-10-24Upgrade to measureme 9.0.0Wesley Wiser-1/+1
2020-10-21Update to rustc-demangle 0.1.18varkor-1/+1
2020-10-21Update rustc-demanglevarkor-1/+1
2020-09-09Move `rustllvm` into `rustc_llvm`Vadim Petrochenkov-1/+1
2020-08-30mv compiler to compiler/mark-0/+34