about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/std_example.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-02 17:10:43 +0200
committerGitHub <noreply@github.com>2024-10-02 17:10:43 +0200
commit5fd6218d7263cd5fb5dbe05b35b5f658ffa6eca2 (patch)
tree1d12eb9ad51bd004568b59dcf3663063138bae0d /compiler/rustc_codegen_cranelift/example/std_example.rs
parentf9ba5529ebd59dff80e81354f207f6b1566f9143 (diff)
parent6b06ceb2fd118a7c6ee62675777a1d503348ef0c (diff)
downloadrust-5fd6218d7263cd5fb5dbe05b35b5f658ffa6eca2.tar.gz
rust-5fd6218d7263cd5fb5dbe05b35b5f658ffa6eca2.zip
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
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions