diff options
| author | BlackHoleFox <blackholefoxdev@gmail.com> | 2022-12-05 23:15:16 -0600 |
|---|---|---|
| committer | BlackHoleFox <blackholefoxdev@gmail.com> | 2023-05-05 01:22:17 -0500 |
| commit | a427d418fd0004f12a7d59899e6994238daed9aa (patch) | |
| tree | 7d3b5300a68d899167dda5553cade0f6adef013d /compiler/rustc_driver_impl/src | |
| parent | 74c4821045c68d42bb8b8a7c998bdb5c2a72bd0d (diff) | |
Add deployment-target --print flag for Apple targets
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 5fac485de64..b9fb944b0c6 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -745,6 +745,22 @@ fn print_crate_info( } } } + DeploymentTarget => { + use rustc_target::spec::current_apple_deployment_target; + + if sess.target.is_like_osx { + safe_println!( + "deployment_target={}", + current_apple_deployment_target(&sess.target) + .expect("unknown Apple target OS") + ) + } else { + early_error( + ErrorOutputType::default(), + "only Apple targets currently support deployment version info", + ) + } + } } } Compilation::Stop |
