]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #90499 - rusticstuff:macos-target-fixes, r=petrochenkov
authorMatthias Krüger <matthias.krueger@famsik.de>
Thu, 25 Nov 2021 14:05:36 +0000 (15:05 +0100)
committerGitHub <noreply@github.com>
Thu, 25 Nov 2021 14:05:36 +0000 (15:05 +0100)
commit07808898335b18d3c2c9ba949d2a3dc07b52eed0
tree94ba5f81db193968421c4af92b08bffa036c8794
parent90dd7c03af736447f4340d7b17fe00eef0b27af7
parentb376f5621b801460b911a75048a70698021bbc69
Rollup merge of #90499 - rusticstuff:macos-target-fixes, r=petrochenkov

Link with default MACOSX_DEPLOYMENT_TARGET if not otherwise specified.

This PR sets the MACOSX_DEPLOYMENT_TARGET environment variable during the linking stage to our default, if it is not specified. This way it matches the deployment target we pass to llvm. If not set the the linker uses Xcode or Xcode commandline tools default which varies by version.

Fixes #90342, #91082.

Drive-by fixes to make Rust behave more like clang:
* Default to 11.0 deployment target for ARM64 which is the earliest version that had support for it.
* Set the llvm target to `arm64-apple-macosx<deployment target>` instead of `aarch64-apple-macosx<deployment target>`.