rust/compiler/rustc_codegen_ssa/src
Matthias Krüger bb544f863f
Rollup merge of #131037 - madsmtm:move-llvm-target-versioning, r=petrochenkov
Move versioned Apple LLVM targets from `rustc_target` to `rustc_codegen_ssa`

Fully specified LLVM targets contain the OS version on macOS/iOS/tvOS/watchOS/visionOS, and this version depends on the deployment target environment variables like `MACOSX_DEPLOYMENT_TARGET`, `IPHONEOS_DEPLOYMENT_TARGET` etc.

We would like to move this to later in the compilation pipeline, both because it feels impure to access environment variables when fetching target information, but mostly because we need access to more information from https://github.com/rust-lang/rust/pull/130883 to do https://github.com/rust-lang/rust/issues/118204. See also https://github.com/rust-lang/rust/pull/129342#issuecomment-2335156119 for some discussion.

The first and second commit does the actual refactor, it should be a non-functional change, the third commit adds diagnostics for invalid deployment targets, which are now possible to do because we have access to the session.

Tested with the same commands as in https://github.com/rust-lang/rust/pull/130435.

r? ``````@petrochenkov``````
2024-11-02 08:33:10 +01:00
..
back Rollup merge of #131037 - madsmtm:move-llvm-target-versioning, r=petrochenkov 2024-11-02 08:33:10 +01:00
debuginfo Effects cleanup 2024-10-26 10:19:07 +08:00
mir compiler: rustc_abi::Abi => BackendRepr 2024-10-29 14:56:00 -07:00
traits compiler: rustc_abi::Abi => BackendRepr 2024-10-29 14:56:00 -07:00
assert_module_sources.rs
base.rs TypingMode 🤔 2024-10-29 17:01:24 +01:00
codegen_attrs.rs nightly feature tracking: get rid of the per-feature bool fields 2024-10-23 09:14:41 +01:00
common.rs Clean up formatting. 2024-09-17 16:24:35 +10:00
errors.rs Emit diagnostics for incorrect deployment targets 2024-11-01 17:07:19 +01:00
lib.rs Emit diagnostics for incorrect deployment targets 2024-11-01 17:07:19 +01:00
meth.rs fix ices on vfe about principal trait 2024-09-23 15:25:52 +08:00
mono_item.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
size_of_val.rs fix ices on vfe about principal trait 2024-09-23 15:25:52 +08:00
target_features.rs get rid of feature list in target feature logic 2024-10-23 09:14:43 +01:00