about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-12 06:57:38 +0000
committerbors <bors@rust-lang.org>2024-09-12 06:57:38 +0000
commit7c7372b6a1b9a8d6b787a3e5a10e4f8325b1fdfc (patch)
tree833e4a8e9063ff6f4bbba31836e34e65d6c01952 /compiler/rustc_resolve/src/lib.rs
parent1f51450c6826cc4c3d1089cd3f57089a14f49190 (diff)
parentdd35398545006f5ad4da8fc2ef0190c55ffda29c (diff)
downloadrust-7c7372b6a1b9a8d6b787a3e5a10e4f8325b1fdfc.tar.gz
rust-7c7372b6a1b9a8d6b787a3e5a10e4f8325b1fdfc.zip
Auto merge of #129369 - madsmtm:apple-cc-linker-pass-target, r=jieyouxu
Pass deployment target when linking with CC on Apple targets

This PR effectively implements what's also being considered in the `cc` crate [here](https://github.com/rust-lang/cc-rs/issues/1030#issuecomment-2051020649), that is:
- When linking macOS targets with CC, pass the `-mmacosx-version-min=.` option to specify the desired deployment target. Also, no longer pass `-m32`/`-m64`, these are redundant since we already pass `-arch`.
- When linking with CC on iOS, tvOS, watchOS and visionOS, only pass `-target` (we assume for these targets that CC forwards to Clang).

This is required to get the linker to emit the correct `LC_BUILD_VERSION` of the final binary. See https://github.com/rust-lang/rust/issues/129432 for more motivation behind this change.

r? compiler

CC `@BlackHoleFox`
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
0 files changed, 0 insertions, 0 deletions