about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-07-24 15:08:21 +0200
committerGitHub <noreply@github.com>2025-07-24 15:08:21 +0200
commit40482a2ffa6213d783ae84b9062e468ea80d62f9 (patch)
tree04a0f7f1b5b32c00af2b60fcf085b3155da320da /compiler/rustc_pattern_analysis/src
parent940376f1b1bbaa22a9eed14ee84a9f6390ffd53a (diff)
parentc4eb07761643d2fa26d6f609eb23c8d22e14d8eb (diff)
downloadrust-40482a2ffa6213d783ae84b9062e468ea80d62f9.tar.gz
rust-40482a2ffa6213d783ae84b9062e468ea80d62f9.zip
Rollup merge of #144094 - saethlin:codegen-the-main-fn, r=petrochenkov
Ensure we codegen the main fn

This fixes two bugs. The one that was identified in the linked issue is that when we have a `main` function, mono collection didn't consider it as an extra collection root.

The other is that since CGU partitioning doesn't  know about the call edges between the entrypoint functions, naively it can put them in different CGUs and mark them all as internal. Which would result in LLVM just deleting all of them. There was an existing hack to exclude `lang = "start"` from internalization, which I've extended to include `main`.

Fixes https://github.com/rust-lang/rust/issues/144052
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions