Add deployment-target --print flag for Apple targets

This commit is contained in:
BlackHoleFox 2022-12-05 23:15:16 -06:00
parent 74c4821045
commit a427d418fd
11 changed files with 73 additions and 14 deletions

View file

@ -1,2 +1,2 @@
error: unknown print request `uwu`. Valid print requests are: `crate-name`, `file-names`, `sysroot`, `target-libdir`, `cfg`, `calling-conventions`, `target-list`, `target-cpus`, `target-features`, `relocation-models`, `code-models`, `tls-models`, `native-static-libs`, `stack-protector-strategies`, `target-spec-json`, `all-target-specs-json`, `link-args`, `split-debuginfo`
error: unknown print request `uwu`. Valid print requests are: `crate-name`, `file-names`, `sysroot`, `target-libdir`, `cfg`, `calling-conventions`, `target-list`, `target-cpus`, `target-features`, `relocation-models`, `code-models`, `tls-models`, `native-static-libs`, `stack-protector-strategies`, `target-spec-json`, `all-target-specs-json`, `link-args`, `split-debuginfo`, `deployment-target`

View file

@ -0,0 +1,4 @@
// compile-flags: --target x86_64-unknown-linux-gnu --print deployment-target
// needs-llvm-components: x86
fn main() {}

View file

@ -0,0 +1,2 @@
error: only Apple targets currently support deployment version info

View file

@ -0,0 +1,7 @@
// only-macos
// compile-flags: --print deployment-target
// normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION."
// normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION"
// check-pass
fn main() {}

View file

@ -0,0 +1 @@
deployment_target=$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION