-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-codegenArea: Code generationArea: Code generationC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
See #72256 (comment) for context.
There's only one place in the compiler that can't call Session::crate_types
because that field is sometimes uninitialized.
rust/src/librustc_codegen_llvm/context.rs
Lines 100 to 103 in 31add7e
/// PIE is potentially more effective than PIC, but can only be used in executables. | |
/// If all our outputs are executables, then we can relax PIC to PIE when producing object code. | |
/// If the list of crate types is not yet known we conservatively return `false`. | |
pub fn all_outputs_are_pic_executables(sess: &Session) -> bool { |
Perhaps this indicates that we want to force initialization of crate_types
somewhere?
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.