diff options
Diffstat (limited to 'tests/run-make/pass-linker-flags')
-rw-r--r-- | tests/run-make/pass-linker-flags/Makefile | 3 | ||||
-rw-r--r-- | tests/run-make/pass-linker-flags/attribute.rs | 11 | ||||
-rw-r--r-- | tests/run-make/pass-linker-flags/empty.rs (renamed from tests/run-make/pass-linker-flags/rs.rs) | 0 |
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/run-make/pass-linker-flags/Makefile b/tests/run-make/pass-linker-flags/Makefile index 6ddbcbb1b..226943e93 100644 --- a/tests/run-make/pass-linker-flags/Makefile +++ b/tests/run-make/pass-linker-flags/Makefile @@ -1,4 +1,5 @@ include ../tools.mk all: - $(RUSTC) rs.rs -Z unstable-options -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3' + $(RUSTC) empty.rs -Z unstable-options -l static=l1 -l link-arg=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3' + $(RUSTC) attribute.rs --print link-args | $(CGREP) -e 'l1.*a1.*l2.*a2.*d1.*a3' diff --git a/tests/run-make/pass-linker-flags/attribute.rs b/tests/run-make/pass-linker-flags/attribute.rs new file mode 100644 index 000000000..6f784c01f --- /dev/null +++ b/tests/run-make/pass-linker-flags/attribute.rs @@ -0,0 +1,11 @@ +#![feature(link_arg_attribute)] + +#[link(kind = "static", name = "l1")] +#[link(kind = "link-arg", name = "a1")] +#[link(kind = "static", name = "l2")] +#[link(kind = "link-arg", name = "a2")] +#[link(kind = "dylib", name = "d1")] +#[link(kind = "link-arg", name = "a3")] +extern "C" {} + +fn main() {} diff --git a/tests/run-make/pass-linker-flags/rs.rs b/tests/run-make/pass-linker-flags/empty.rs index f328e4d9d..f328e4d9d 100644 --- a/tests/run-make/pass-linker-flags/rs.rs +++ b/tests/run-make/pass-linker-flags/empty.rs |