diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/run-make-fulldeps/override-aliased-flags | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/override-aliased-flags')
-rw-r--r-- | tests/run-make-fulldeps/override-aliased-flags/Makefile | 22 | ||||
-rw-r--r-- | tests/run-make-fulldeps/override-aliased-flags/main.rs | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/run-make-fulldeps/override-aliased-flags/Makefile b/tests/run-make-fulldeps/override-aliased-flags/Makefile new file mode 100644 index 000000000..186b8c7c8 --- /dev/null +++ b/tests/run-make-fulldeps/override-aliased-flags/Makefile @@ -0,0 +1,22 @@ +include ../tools.mk + +# FIXME: it would be good to check that it's actually the rightmost flags +# that are used when multiple flags are specified, but I can't think of a +# reliable way to check this. + +all: + # Test that `-O` and `-C opt-level` can be specified multiple times. + # The rightmost flag will be used over any previous flags. + $(RUSTC) -O -O main.rs + $(RUSTC) -O -C opt-level=0 main.rs + $(RUSTC) -C opt-level=0 -O main.rs + $(RUSTC) -C opt-level=0 -C opt-level=2 main.rs + $(RUSTC) -C opt-level=2 -C opt-level=0 main.rs + + # Test that `-g` and `-C debuginfo` can be specified multiple times. + # The rightmost flag will be used over any previous flags. + $(RUSTC) -g -g main.rs + $(RUSTC) -g -C debuginfo=0 main.rs + $(RUSTC) -C debuginfo=0 -g main.rs + $(RUSTC) -C debuginfo=0 -C debuginfo=2 main.rs + $(RUSTC) -C debuginfo=2 -C debuginfo=0 main.rs diff --git a/tests/run-make-fulldeps/override-aliased-flags/main.rs b/tests/run-make-fulldeps/override-aliased-flags/main.rs new file mode 100644 index 000000000..f328e4d9d --- /dev/null +++ b/tests/run-make-fulldeps/override-aliased-flags/main.rs @@ -0,0 +1 @@ +fn main() {} |