about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/messages.ftl
AgeCommit message (Collapse)AuthorLines
2025-07-25Use the object crate rather than LLVM for extracting bitcode sectionsbjorn3-1/+1
2025-07-21Move LTO symbol export calculation from backends to cg_ssabjorn3-10/+0
2025-07-03Merge run_fat_lto, optimize_fat and autodiff into run_and_optimize_fat_ltobjorn3-1/+0
2025-06-19move -Ctarget-feature handling into shared codeRalf Jung-10/+0
2025-06-09-Zretpoline and -Zretpoline-external-thunk flags (target modifiers) to ↵Andrew Zhogin-9/+0
enable retpoline-related target features
2025-06-07store `target.min_global_align` as an `Align`Folkert de Vries-6/+0
2025-04-05KCFI: Add KCFI arity indicator supportRamon de C Valle-0/+2
Adds KCFI arity indicator support to the Rust compiler (see rust-lang/rust#138311, https://github.com/llvm/llvm-project/pull/121070, and https://lore.kernel.org/lkml/CANiq72=3ghFxy8E=AU9p+0imFxKr5iU3sd0hVUXed5BA+KjdNQ@mail.gmail.com/).
2025-02-21update autodiff flagsManuel Drehwald-0/+1
2025-02-13[cg_llvm] Remove dead error messageDaniel Paoliello-3/+0
2025-01-05Auto merge of #134794 - RalfJung:abi-required-target-features, r=workingjubileebors-3/+1
Add a notion of "some ABIs require certain target features" I think I finally found the right shape for the data and checks that I recently added in https://github.com/rust-lang/rust/pull/133099, https://github.com/rust-lang/rust/pull/133417, https://github.com/rust-lang/rust/pull/134337: we have a notion of "this ABI requires the following list of target features, and it is incompatible with the following list of target features". Both `-Ctarget-feature` and `#[target_feature]` are updated to ensure we follow the rules of the ABI. This removes all the "toggleability" stuff introduced before, though we do keep the notion of a fully "forbidden" target feature -- this is needed to deal with target features that are actual ABI switches, and hence are needed to even compute the list of required target features. We always explicitly (un)set all required and in-conflict features, just to avoid potential trouble caused by the default features of whatever the base CPU is. We do this *before* applying `-Ctarget-feature` to maintain backward compatibility; this poses a slight risk of missing some implicit feature dependencies in LLVM but has the advantage of not breaking users that deliberately toggle ABI-relevant target features. They get a warning but the feature does get toggled the way they requested. For now, our logic supports x86, ARM, and RISC-V (just like the previous logic did). Unsurprisingly, RISC-V is the nicest. ;) As a side-effect this also (unstably) allows *enabling* `x87` when that is harmless. I used the opportunity to mark SSE2 as required on x86-64, to better match the actual logic in LLVM and because all x86-64 chips do have SSE2. This infrastructure also prepares us for requiring SSE on x86-32 when we want to use that for our ABI (and for float semantics sanity), see https://github.com/rust-lang/rust/issues/133611, but no such change is happening in this PR. r? `@workingjubilee`
2025-01-01upstream rustc_codegen_llvm changes for enzyme/autodiffManuel Drehwald-0/+4
2024-12-31explicitly model that certain ABIs require/forbid certain target featuresRalf Jung-3/+1
2024-11-04mark some target features as 'forbidden' so they cannot be (un)setRalf Jung-0/+5
For now, this is just a warning, but should become a hard error in the future
2024-09-24codegen_ssa: consolidate tied feature checkingDavid Wood-6/+0
`rustc_codegen_llvm` and `rustc_codegen_gcc` duplicated logic for checking if tied target features were partially enabled. This commit consolidates these checks into `rustc_codegen_ssa` in the `codegen_fn_attrs` query, which also is run pre-monomorphisation for each function, which ensures that this check is run for unused functions, as would be expected.
2024-08-17Always use ar_archive_writer for import libsChris Denton-3/+0
2024-07-30Move mingw dlltool invocation to cg_ssabjorn3-10/+0
2024-05-15Use an error struct instead of a panicAlice Ryhl-0/+2
2024-02-03Emit a diagnostic for invalid target optionsBen Kimock-0/+2
2024-01-18llvm: simplify data layout checkDavid Wood-0/+3
Don't skip the inconsistent data layout check for custom LLVMs. With #118708, all targets will have a simple test that would trigger this check if LLVM's data layouts do change - so data layouts would be corrected during the LLVM upgrade. Therefore, with builtin targets, this check won't trigger with our LLVM because each target will have been confirmed to work. With non-builtin targets, this check is probably useful to have because you can change the data layout in your target and if its wrong then that could lead to bugs. When using a custom LLVM, the same justification makes sense for non-builtin targets as with our LLVM, the user can update their target to match their LLVM and that's probably a good thing to do. However, with a custom LLVM, the user cannot change the builtin target data layouts if they don't match - though given that the compiler's data layout is used for layout computation and a bunch of other things - you could get some bugs because of the mismatch and probably want to know about that. `CFG_LLVM_ROOT` was also always set during local development with `download-ci-llvm` so this bug would never trigger locally. Signed-off-by: David Wood <david@davidtw.co>
2023-11-06warn when using an unstable feature with -Ctarget-featureRalf Jung-2/+6
2023-09-23allow LTO on `proc-macro` crates with `-Zdylib-lto`onur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-08debuginfo: add compiler option to allow compressed debuginfo sectionsAugie Fackler-0/+2
LLVM already supports emitting compressed debuginfo. In debuginfo=full builds, the debug section is often a large amount of data, and it typically compresses very well (3x is not unreasonable.) We add a new knob to allow debuginfo to be compressed when the matching LLVM functionality is present. Like clang, if a known-but-disabled compression mechanism is requested, we disable compression and emit uncompressed debuginfo sections. The API is different enough on older LLVMs we just pretend the support is missing on LLVM older than 16.
2023-07-17Better diagnostics for dlltool errors.James Farrell-1/+2
When dlltool fails, show the full command that was executed. In particular, llvm-dlltool is not very helpful, printing a generic usage message rather than what actually went wrong, so stdout and stderr aren't of much use when troubleshooting.
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-2/+6
2023-05-25Ensure Fluent messages are in alphabetical orderclubby789-54/+54
2023-05-06Rollup merge of #111203 - Kobzol:remark-print-kind, r=tmiaskoMatthias Krüger-1/+1
Output LLVM optimization remark kind in `-Cremark` output Since https://github.com/rust-lang/rust/pull/90833, the optimization remark kind has not been printed. Therefore it wasn't possible to easily determine from the log (in a programmatic way) which remark kind was produced. I think that the most interesting remarks are the missed ones, which can lead users to some code optimization. Maybe we could also change the format closer to the "old" one: ``` note: optimization remark for tailcallelim at /checkout/src/libcore/num/mod.rs:1:0: marked this call a tail call candidate ``` I wanted to programatically parse the remarks so that they could work e.g. with https://github.com/OfekShilon/optview2. However, now that I think about it, probably the proper solution is to tell rustc to output them to YAML and then use the YAML as input for the opt remark visualization tools. The flag for enabling this does not seem to work though (https://github.com/rust-lang/rust/issues/96705#issuecomment-1117632322). Still I think that it's good to output the remark kind anyway, it's an important piece of information. r? ```@tmiasko```
2023-05-04Output LLVM optimization remark kind in `-Cremark` outputJakub Beránek-1/+1
2023-04-18Stablize raw-dylib, link_ordinal and -CdlltoolDaniel Paoliello-1/+1
2023-03-29Check for escape sequences in Fluent resourcesclubby789-1/+2
2023-03-11Simplify message pathsest31-0/+89
This makes it easier to open the messages file while developing on features. The commit was the result of automatted changes: for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done