about summary refs log tree commit diff
path: root/compiler/rustc_llvm
AgeCommit message (Collapse)AuthorLines
2024-10-16rustc_llvm: Fix flattened CLI argsArthur Eubanks-2/+2
Fixes string manipulation errors introduced in #130446.
2024-10-11Rollup merge of #131552 - durin42:llvm-20-getOrInsertDeclaration, r=cuviperTrevor Gross-6/+19
RustWrapper: adapt for rename of Intrinsic::getDeclaration llvm/llvm-project@fa789dffb1e12c2aece0187aeacc48dfb1768340 renamed getDeclaration to getOrInsertDeclaration. `@rustbot` label: +llvm-main
2024-10-11RustWrapper: adapt for rename of Intrinsic::getDeclarationAugie Fackler-6/+19
llvm/llvm-project@fa789dffb1e12c2aece0187aeacc48dfb1768340 renamed getDeclaration to getOrInsertDeclaration. @rustbot label: +llvm-main
2024-10-11coverage: Remove code related to LLVM 17Zalathar-1/+1
2024-10-08coverage. Disable supporting mcdc on llvm-18zhuyunxing-44/+15
2024-09-30Unpin `cc` and upgrade to the latest versionTrevor Gross-1/+1
`cc` was previously pinned because version 1.1.106 dropped support for Visual Studio 12 (2013), and we wanted to decouple that from the rest of the automated updates. As noted in [2], there is no longer anything indicating we support VS2013, so it should be okay to unpin it. `cc` 1.1.22 contains a fix that may help improve the high MSVC CI failure rate [3], so we also have motivation to update to that point. [1]: https://github.com/rust-lang/rust/issues/129307 [2]: https://github.com/rust-lang/rust/issues/129307#issuecomment-2383749868 [3]: https://github.com/rust-lang/rust/issues/127883
2024-09-25Pass Module Analysis Manager to Standard InstrumentationsAleksei Romanov-5/+6
2024-09-22Auto merge of #130446 - durin42:llvm-20-fix-CommandLineArgs, r=workingjubileebors-1/+19
rustc_llvm: adapt to flattened CLI args in LLVM This changed in llvm/llvm-project@e190d074a0a77c9f8a7d7938a8187a7e2076e290. I decided to stick with more duplication between the ifdef blocks to make the code easier to read for the next two years before we can plausibly drop LLVM 19. `@rustbot` label: +llvm-main try-job: x86_64-msvc
2024-09-18Update the minimum external LLVM to 18Josh Stone-78/+10
2024-09-18llvm-wrapper: adapt for LLVM API changes, second tryKrasimir Georgiev-0/+4
2024-09-17Rollup merge of #130477 - tmandry:revert-llvm-20-lto, r=tmandryMatthias Krüger-7/+3
Revert #129749 to fix segfault in LLVM This reverts commit 8c7a7e346be4cdf13e77ab4acbfb5ade819a4e60, reversing changes made to a00bd75b6c5c96d0a35afa2dc07ce3155112d278. Reported in https://github.com/rust-lang/rust/pull/129749#issuecomment-2354417960. `@nikic's` theory is that the LLVM API changed in a way that makes it impossible to use concurrently from multiple threads (https://github.com/llvm/llvm-project/pull/106427#issuecomment-2354783802). I pinged `@krasimirgg` who was fine with reverting. r? `@rust-lang/wg-llvm`
2024-09-16Revert "Rollup merge of #129749 - krasimirgg:llvm-20-lto, r=nikic"Tyler Mandry-7/+3
This reverts commit 8c7a7e346be4cdf13e77ab4acbfb5ade819a4e60, reversing changes made to a00bd75b6c5c96d0a35afa2dc07ce3155112d278.
2024-09-16PassWrapper: clang-format has spokenAugie Fackler-1/+2
2024-09-16rustc_llvm: adapt to flattened CLI args in LLVMAugie Fackler-1/+18
This changed in llvm/llvm-project@e190d074a0a77c9f8a7d7938a8187a7e2076e290. I decided to stick with more duplication between the ifdef blocks to make the code easier to read for the next two years before we can plausibly drop LLVM 19. @rustbot label: +llvm-main
2024-09-16rustc_llvm: update for ↵Augie Fackler-2/+6
llvm/llvm-project@2ae968a0d9fb61606b020e898d884c82dd0ed8b5 Just a simple header move. @rustbot label: +llvm-main
2024-09-15Add system libs when cross compiling for WindowsChris Denton-1/+4
2024-09-05update cfgsBoxy-1/+0
2024-08-31Rollup merge of #129749 - krasimirgg:llvm-20-lto, r=nikicMatthias Krüger-3/+7
llvm-wrapper: adapt for LLVM API changes No functional changes intended. Updates the wrapper for https://github.com/5c4lar/llvm-project/commit/21eddfac3d75879b3e0b09c5bc848526dcab6ab0. ````@rustbot```` label: +llvm-main r? ````@nikic````
2024-08-29Rollup merge of #128970 - DianQK:lint-llvm-ir, r=nikicGuillaume Gomez-1/+8
Add `-Zlint-llvm-ir` This flag is similar to `-Zverify-llvm-ir` and allows us to lint the generated IR. r? compiler
2024-08-29llvm-wrapper: adapt for LLVM API changesKrasimir Georgiev-3/+7
Updates the wrapper for https://github.com/5c4lar/llvm-project/commit/21eddfac3d75879b3e0b09c5bc848526dcab6ab0.
2024-08-29Add `-Zlint-llvm-ir`DianQK-1/+8
2024-08-27Rollup merge of #129648 - nnethercote:unreachable_pub-2, r=UrgauMatthias Krüger-0/+1
More `unreachable_pub` Add `unreachable_pub` checking to some more compiler crates. A follow-up to #126013. r? ``@Urgau``
2024-08-27Rollup merge of #129635 - compiler-errors:unsafe-blocks, r=spastorinoMatthias Krüger-2/+3
Use unsafe extern blocks throughout the compiler Making this change in preparation for edition 2024. r? spastorino
2024-08-27Rollup merge of #126985 - Mrmaxmeier:dwarf-embed-source, r=davidtwcoTrevor Gross-2/+7
Implement `-Z embed-source` (DWARFv5 source code embedding extension) Implement https://github.com/rust-lang/compiler-team/issues/764 MCP which adds an unstable flag that exposes LLVM's [DWARFv5 source code embedding](https://dwarfstd.org/issues/180201.1.html) support.
2024-08-27Add `warn(unreachable_pub)` to `rustc_llvm`.Nicholas Nethercote-0/+1
2024-08-26Use unsafe extern blocks throughout the compilerMichael Goulet-2/+3
2024-08-24Rollup merge of #129290 - tgross35:pin-cc, r=Mark-SimulacrumMatthias Krüger-1/+1
Pin `cc` to 1.0.105 `cc` 1.0.106 removes support for Visual Studio 12. Pin to 1.0.105 so we don't drop support yet. Fixes: https://github.com/rust-lang/rust/pull/128722#issuecomment-2297605573
2024-08-21llvm-wrapper: adapt for LLVM 20 API changesKrasimir Georgiev-0/+11
No functional changes intended. Adapts llvm-wrapper for the LLVM commits https://github.com/llvm/llvm-project/commit/0f22d47a7a1f70ec77ea8ccdf08a6487827937db and https://github.com/llvm/llvm-project/commit/d6d8243dcd4ea768549904036ed31b8e59e14c73.
2024-08-19Pin `cc` to 1.0.105Trevor Gross-1/+1
`cc` 1.0.106 removes support for Visual Studio 12. Pin to 1.0.105 so we don't drop support yet. Fixes: https://github.com/rust-lang/rust/pull/128722#issuecomment-2297605573
2024-08-15Auto merge of #128936 - bjorn3:fix_thin_archive_reading, r=jieyouxubors-9/+5
Support reading thin archives in ArArchiveBuilder And switch to using ArArchiveBuilder with the LLVM backend too now that all regressions are fixed. Fixes https://github.com/rust-lang/rust/issues/107407 Fixes https://github.com/rust-lang/rust/issues/107162 https://github.com/rust-lang/rust/issues/107495 has been fixed in a previous PR already.
2024-08-14Fix null pointer dereference when a file is not an object filebjorn3-0/+3
2024-08-14Use toString instead of raw_svector_ostream for error messagesbjorn3-9/+2
2024-08-12Auto merge of #128371 - andjo403:rangeAttribute, r=nikicbors-0/+12
Add range attribute to scalar function results and arguments as LLVM 19 adds the range attribute this starts to use it for better optimization. hade been interesting to see a perf run with the https://github.com/rust-lang/rust/pull/127513 closes https://github.com/rust-lang/rust/issues/50156 cc https://github.com/rust-lang/rust/issues/49572 shall be fixed but not possible to see as there is asserts that already trigger the optimization.
2024-08-11Add range attribute to scalar function results and argumentsAndreas Jonson-0/+12
2024-08-09Enable zstd for debug compression.Kyle Huey-3/+26
Set LLVM_ENABLE_ZSTD alongside LLVM_ENABLE_ZLIB so that --compress-debug-sections=zstd is an option. Use static linking to avoid a new runtime dependency. Add an llvm.libzstd bootstrap option for LLVM with zstd. Set it off by default except for the dist builder. Handle llvm-config --system-libs output that contains static libraries.
2024-07-30Disable MC/DC tests on LLVM 19Krasimir Georgiev-1/+1
Disable the tests and generate an error if MC/DC is used on LLVM 19. The support will be ported separately, as it is substantially different on LLVM 19, and there are no plans to support both versions.
2024-07-29Add `-Z embed-source=yes` to embed source code in DWARF debug infoMrmaxmeier-2/+7
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-25LLVM: LLVM-20.0 removes MMX typesMatthew Maurer-2/+0
See llvm/llvm-project#98505
2024-07-16Rollup merge of #124033 - bjorn3:ar_archive_writer_0_3_0, r=davidtwcoTrevor Gross-31/+105
Sync ar_archive_writer to LLVM 18.1.3 From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
2024-07-16Fix unsafe_op_in_unsafe_fn in compilerMichael Goulet-1/+1
2024-07-12Remove LLVMRustDIBuilderInsertDeclareAtEnd return valueNikita Popov-11/+6
The return value changed from an Instruction to a DbgRecord in LLVM 19. As we don't actually use the result, drop the return value entirely to support both.
2024-07-12Fix incorrect NDEBUG handling in LLVM bindingsNikita Popov-2/+1
We currently compile our LLVM bindings using `-DNDEBUG` if debuginfo for LLVM is disabled. However, `NDEBUG` doesn't have any relation to debuginfo, it controls whether assertions are enabled. Rename the environment variable to `LLVM_ASSERTIONS` and drive it using the `llvm_assertions` option. Also drop the explicit `debug(false)` call, as cc already sets this up using the cargo `DEBUG` environment variable.
2024-07-07Fix review commentsbjorn3-0/+5
2024-07-07Fix building on LLVM 17bjorn3-0/+3
2024-07-07Sync ar_archive_writer to LLVM 18.1.3bjorn3-31/+97
From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
2024-07-02Rename the `asm-comments` compiler flag to `verbose-asm`Trevor Gross-2/+2
Since this codegen flag now only controls LLVM-generated comments rather than all assembly comments, make the name more accurate (and also match Clang).
2024-07-02Always preserve user-written comments in assemblyTrevor Gross-1/+2
2024-06-27Auto merge of #126907 - glaubitz:sparc-fixes, r=nagisabors-0/+1
Fixes for 32-bit SPARC on Linux This PR fixes a number of issues which previously prevented `rustc` from being built successfully for 32-bit SPARC using the `sparc-unknown-linux-gnu` triplet. In particular, it adds linking against `libatomic` where necessary, uses portable `AtomicU64` for `rustc_data_structures` and rewrites the spec for `sparc_unknown_linux_gnu` to use `TargetOptions` and replaces the previously used `-mv8plus` with the more portable `-mcpu=v9 -m32`. To make `rustc` build successfully, support for 32-bit SPARC needs to be added to the `object` crate as well as the `nix` crate which I will be sending out later as well. r? nagisa
2024-06-26Format C++ files in `llvm-wrapper`DianQK-821/+764