rust/compiler/rustc_codegen_ssa/src
Matthias Krüger 5fd6218d72
Rollup merge of #131016 - madsmtm:no-sdk-version-in-object, r=jieyouxu
Apple: Do not specify an SDK version in `rlib` object files

This was added in https://github.com/rust-lang/rust/pull/114114, but is unnecessary, since it ends up being overwritten when linking anyhow, and it feels wrong to embed some arbitrary SDK version in here. The object files produced by LLVM also do not set this, and the tooling shows `n/a` when it's `0`, so it seems to genuinely be optional in object files.

I've also added a test for the different places the SDK version shows up, and documented a bit more in the code how SDK versions work.

See https://github.com/rust-lang/rust/issues/129432 for the bigger picture.

Tested with (excludes the same few targets as in https://github.com/rust-lang/rust/pull/130435):
```console
./x test tests/run-make/apple-sdk-version --target aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7k-apple-watchos,armv7s-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin
IPHONEOS_DEPLOYMENT_TARGET=10.0 ./x test tests/run-make/apple-sdk-version --target=i386-apple-ios
```

CC `@BlackHoleFox,` you [originally commented on these values](https://github.com/rust-lang/rust/pull/114114#discussion_r1300599445).

`@rustbot` label O-apple
2024-10-02 17:10:43 +02:00
..
back Rollup merge of #131016 - madsmtm:no-sdk-version-in-object, r=jieyouxu 2024-10-02 17:10:43 +02:00
debuginfo Do not unnecessarily eval consts in codegen 2024-09-20 20:38:11 -04:00
mir Auto merge of #130329 - khuey:reorder-constant-spills, r=davidtwco 2024-09-26 02:37:52 +00:00
traits Auto merge of #130389 - Luv-Ray:LLVMMDNodeInContext2, r=nikic 2024-09-24 12:07:48 +00:00
assert_module_sources.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
base.rs Relate binders explicitly, do a leak check too 2024-09-30 12:42:29 -04:00
codegen_attrs.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
common.rs Clean up formatting. 2024-09-17 16:24:35 +10:00
errors.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
lib.rs Dogfood feature(file_buffered) 2024-09-24 14:25:16 -07: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 Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00