Diggory Blake
c6a952159f
Restrict sysroot crate imports to those defined in this repo.
...
It's common to import dependencies from the sysroot via `extern crate`
rather than use an explicit cargo dependency, when it's necessary to use
the same dependency version as used by rustc itself. However, this is
dangerous for crates.io crates, since rustc may not pull in the
dependency on some targets, or may pull in multiple versions. In both
cases, the `extern crate` fails to resolve.
To address this, re-export all such dependencies from the appropriate
`rustc_*` crates, and use this alias from crates which would otherwise
need to use `extern crate`.
2025-10-15 13:17:25 +01:00
bjorn3
f2933b34a8
Remove want_summary argument from prepare_thin
...
It is always false nowadays. ThinLTO summary writing is instead done by
llvm_optimize.
2025-09-06 18:37:23 +00:00
bjorn3
e3d0b7d648
Remove thin_link_data method from ThinBufferMethods
...
It is only used within cg_llvm.
2025-09-06 18:37:23 +00:00
bjorn3
319fe230f0
Special case allocator module submission to avoid special casing it elsewhere
...
A lot of places had special handling just in case they would get an
allocator module even though most of these places could never get one or
would have a trivial implementation for the allocator module. Moving all
handling of the allocator module to a single place simplifies things a
fair bit.
2025-09-04 08:21:10 +00:00
bjorn3
525c6a3562
Directly raise fatal errors inside the codegen backends
...
As opposed to passing it around through Result.
2025-08-24 11:20:41 +00:00
bjorn3
948f7798d7
Remove support for -Zcombine-cgu
...
Nobody seems to actually use this, while still adding some extra
complexity to the already rather complex codegen coordinator code.
It is also not supported by any backend other than the LLVM backend.
2025-07-26 13:52:24 +00:00
bjorn3
dadc4cae50
Remove each_linked_rlib_for_lto from CodegenContext
2025-07-21 07:58:44 +00:00
bjorn3
1a6f941d2b
Move exported_symbols_for_lto out of CodegenContext
2025-07-21 07:58:44 +00:00
bjorn3
6e757354ad
Merge exported_symbols computation into exported_symbols_for_lto
...
And move exported_symbols_for_lto call from backends to cg_ssa.
2025-07-21 07:58:44 +00:00
bjorn3
1c8dc6f440
Move LTO symbol export calculation from backends to cg_ssa
2025-07-21 07:58:44 +00:00
bjorn3
112799e637
Merge modules and cached_modules for fat LTO
...
The modules vec can already contain serialized modules and there is no
need to distinguish between cached and non-cached cgus at LTO time.
2025-07-21 07:58:44 +00:00
bjorn3
7fd78df346
Move dcx creation into WriteBackendMethods::codegen
2025-07-03 14:43:09 +00:00
bjorn3
653bb64c75
Remove LtoModuleCodegen
...
Most uses of it either contain a fat or thin lto module. Only
WorkItem::LTO could contain both, but splitting that enum variant
doesn't complicate things much.
2025-07-03 14:28:18 +00:00
Guillaume Gomez
c48d8d4d80
Merge commit 'fda0bb9588912a3e0606e880ca9f6e913cf8a5a4' into subtree-update_cg_gcc_2025-06-18
2025-06-18 15:11:44 +02:00
Guillaume Gomez
1c4ab86955
Merge commit '6ba33f5e1189a5ae58fb96ce3546e76b13d090f5' into subtree-update_cg_gcc_2025-05-14
2025-05-14 13:51:02 +02:00
Bryanskiy
14535312b5
Initial support for dynamically linked crates
2025-05-04 22:03:15 +03:00
Michael Goulet
9c372d8940
Prepend temp files with a string per invocation of rustc
2025-04-07 20:48:40 +00:00
Michael Goulet
effef88ac7
Simplify temp path creation a bit
2025-04-07 20:48:40 +00:00
DianQK
9431427cc3
Add new_regular and new_allocator to ModuleCodegen
2025-02-23 21:23:38 +08:00
Askar Safin
851cc4bed4
compiler/rustc_codegen_gcc/src/back/lto.rs: delete "unsafe impl Sync/Send"
2025-02-11 09:47:13 +03:00
Antoni Boucher
06f0a9bc78
Merge commit '59a81c2ca1edc88ad3ac4b27a8e03977ffb8e73a' into subtree-update_cg_gcc_2025_01_12
2025-01-13 10:53:58 -05:00
Matthew Maurer
fc32dd49cb
llvm: Ignore error value that is always false
...
See llvm/llvm-project#121851
For LLVM 20+, this function (`renameModuleForThinLTO`) has no return
value. For prior versions of LLVM, this never failed, but had a
signature which allowed an error value people were handling.
2025-01-07 01:02:22 +00:00
Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -04:00
Nicholas Nethercote
bbe28cf1d9
Remove serialized_bitcode from LtoModuleCodegen.
...
It's unused.
2024-09-09 09:00:50 +10:00
Guillaume Gomez
7cbe50e209
Merge commit '98ed962c7d3eebe12c97588e61245273d265e72f' into master
2024-07-10 12:44:23 +02:00
Oli Scherer
7ba82d61eb
Use a dedicated type instead of a reference for the diagnostic context
...
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
2024-06-18 15:42:11 +00:00
Michael Baikov
691e953da6
Save/restore more items in cache with incremental compilation
2024-04-06 10:59:24 -04:00
Guillaume Gomez
0d359efbe6
Merge commit 'b385428e3ddf330805241e7758e773f933357c4b' into subtree-update_cg_gcc_2024-03-05
2024-03-05 19:58:36 +01:00
Nicholas Nethercote
f422dca3ae
Rename many DiagCtxt arguments.
2023-12-18 16:06:22 +11:00
Nicholas Nethercote
7c656bc05b
Rename CodegenContext::create_diag_handler as CodegenContext::create_dcx.
2023-12-18 16:06:21 +11:00
Nicholas Nethercote
cde19c016e
Rename Handler as DiagCtxt.
2023-12-18 16:06:19 +11:00
Antoni Boucher
30290c8b41
Merge commit '11a0cceab966e5ff1058ddbcab5977e8a1d6d290' into subtree-update_cg_gcc_2023-10-09
2023-10-09 15:53:34 -04:00
Antoni Boucher
6bb2af0e6d
Merge commit '08a6d6e16b5efe217123e780398969946266268f' into sync-cg_gcc-2023-03-04
2023-03-05 12:03:19 -05:00
Rémy Rakic
af22801db0
simplify a self-profiling activity call in the cg_gcc backend
2022-04-07 15:47:20 +02:00
bjorn3
bbff48e094
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
2022-03-26 18:29:37 +01:00
bjorn3
b799d6e0a5
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
2021-12-31 16:26:32 +01:00
est31
15de4cbc4b
Remove redundant [..]s
2021-12-09 00:01:29 +01:00
Antoni Boucher
3d5d4e324d
Merge commit 'e228f0c16ea8c34794a6285bf57aab627c26b147' into libgccjit-codegen
2021-08-15 08:29:07 -04:00
Antoni Boucher
f7237f16ae
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
...
git-subtree-dir: compiler/rustc_codegen_gcc
git-subtree-mainline: ae90dcf0207c57c3034f00b07048d63f8b2363c8
git-subtree-split: afae271d5d3719eeb92c18bc004bb6d1965a5f3f
2021-08-12 21:53:49 -04:00