Skip to content

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Aug 28, 2025

Only the LLVM backend needs those specific symbols exported and it only needs them to be exported for LTO, not from cdylibs in general.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@lqd
Copy link
Member

lqd commented Aug 28, 2025

r? lqd

Good find and a good cleanup. Since this is two consecutive moves though, can you squash the first two commits? Reading them made me believe we had this code duplicated at first.

r=me with that done and ci green

@rustbot rustbot assigned lqd and unassigned davidtwco Aug 28, 2025
bjorn3 added 2 commits August 28, 2025 19:36
…llvm

Don't export them from cdylibs. There is no need to do so and it
complicates exported_non_generic_symbols. In addition the GCC backend
likely uses different symbols and may potentially not even need us to
explicitly tell it to export the symbols it needs.
All other sanitizer symbols are handled in prepare_lto already.
@bjorn3 bjorn3 force-pushed the sanitize_symbol_export_improvements branch from 4f80911 to 23e72ab Compare August 28, 2025 19:37
@bjorn3
Copy link
Member Author

bjorn3 commented Aug 28, 2025

Squashed the first two commits. CI was green before the squash.

@bors r=lqd

@bors
Copy link
Collaborator

bors commented Aug 28, 2025

📌 Commit 23e72ab has been approved by lqd

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 28, 2025
bors added a commit that referenced this pull request Aug 28, 2025
Rollup of 6 pull requests

Successful merges:

 - #142472 (Add new `doc(attribute = "...")` attribute)
 - #145368 (CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`)
 - #145853 (Improve error messages around invalid literals in attribute arguments)
 - #145920 (bootstrap: Explicitly mark the end of a failed test's captured output)
 - #145937 (add doc-hidden to exports in attribute prelude)
 - #145965 (Move exporting of profiler and sanitizer symbols to the LLVM backend)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a60b96a into rust-lang:master Aug 28, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Aug 28, 2025
Rollup merge of #145965 - bjorn3:sanitize_symbol_export_improvements, r=lqd

Move exporting of profiler and sanitizer symbols to the LLVM backend

Only the LLVM backend needs those specific symbols exported and it only needs them to be exported for LTO, not from cdylibs in general.
@rustbot rustbot added this to the 1.91.0 milestone Aug 28, 2025
@bjorn3 bjorn3 deleted the sanitize_symbol_export_improvements branch August 29, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants