rust/compiler/rustc_middle/src
bors 493c38ba37 Auto merge of #127173 - bjorn3:mangle_rustc_std_internal_symbol, r=wesleywiser,jieyouxu
Mangle rustc_std_internal_symbols functions

This reduces the risk of issues when using a staticlib or rust dylib compiled with a different rustc version in a rust program. Currently this will either (in the case of staticlib) cause a linker error due to duplicate symbol definitions, or (in the case of rust dylibs) cause rustc_std_internal_symbols functions to be silently overridden. As rust gets more commonly used inside the implementation of libraries consumed with a C interface (like Spidermonkey, Ruby YJIT (curently has to do partial linking of all rust code to hide all symbols not part of the C api), the Rusticl OpenCL implementation in mesa) this is becoming much more of an issue. With this PR the only symbols remaining with an unmangled name are rust_eh_personality (LLVM doesn't allow renaming it) and `__rust_no_alloc_shim_is_unstable`.

Helps mitigate https://github.com/rust-lang/rust/issues/104707

try-job: aarch64-gnu-debug
try-job: aarch64-apple
try-job: x86_64-apple-1
try-job: x86_64-mingw-1
try-job: i686-mingw-1
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: test-various
try-job: armhf-gnu
2025-03-17 22:16:22 +00:00
..
dep_graph Remove impl_for_typed_def_id macro. 2025-02-04 08:34:11 +11:00
hir Rollup merge of #138482 - nnethercote:fix-hir-printing, r=compiler-errors 2025-03-15 00:18:25 +01:00
hooks Pretty print pattern type values with transmute if they don't satisfy their pattern 2025-02-05 14:56:41 +00:00
infer Clean up trivial traversal/lift impl generator macro calls. 2025-02-06 13:31:43 +11:00
middle Mark #[rustc_std_internal_symbol] as extern indicator 2025-03-17 14:06:56 +00:00
mir Rollup merge of #137465 - Zalathar:visit-primary, r=oli-obk 2025-03-17 16:34:48 +01:00
query Move codec module back into middle 2025-03-15 06:42:48 +00:00
thir Implement .use keyword as an alias of clone 2025-03-06 17:58:32 -03:00
traits Fold visit into ty 2025-03-15 06:34:36 +00:00
ty Auto merge of #138595 - jhpratt:rollup-09pvfzu, r=jhpratt 2025-03-17 10:43:38 +00:00
util Simplify intra-crate qualifiers. 2025-02-11 14:59:13 +11:00
arena.rs intern valtrees 2025-02-13 00:38:17 +01:00
error.rs Teach structured errors to display short Ty 2025-02-25 16:56:03 +00:00
lib.rs Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
lint.rs Move methods from Map to TyCtxt, part 3. 2025-02-21 14:31:09 +11:00
macros.rs Fold visit into ty 2025-03-15 06:34:36 +00:00
metadata.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs Split visit_primary_bindings into two variants 2025-03-16 12:10:35 +11:00
values.rs Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00