Add deployment-target --print flag for Apple targets
This commit is contained in:
parent
74c4821045
commit
a427d418fd
11 changed files with 73 additions and 14 deletions
|
|
@ -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`
|
||||
|
||||
|
|
|
|||
4
tests/ui/deployment-target/invalid-target.rs
Normal file
4
tests/ui/deployment-target/invalid-target.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// compile-flags: --target x86_64-unknown-linux-gnu --print deployment-target
|
||||
// needs-llvm-components: x86
|
||||
|
||||
fn main() {}
|
||||
2
tests/ui/deployment-target/invalid-target.stderr
Normal file
2
tests/ui/deployment-target/invalid-target.stderr
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
error: only Apple targets currently support deployment version info
|
||||
|
||||
7
tests/ui/deployment-target/macos-target.rs
Normal file
7
tests/ui/deployment-target/macos-target.rs
Normal 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() {}
|
||||
1
tests/ui/deployment-target/macos-target.stdout
Normal file
1
tests/ui/deployment-target/macos-target.stdout
Normal file
|
|
@ -0,0 +1 @@
|
|||
deployment_target=$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION
|
||||
Loading…
Add table
Add a link
Reference in a new issue