Skip to content

Commit 9f925ec

Browse files
Apply suggestions from review
Co-authored-by: Vadim Petrochenkov <[email protected]>
1 parent dd26ffd commit 9f925ec

File tree

20 files changed

+20
-52
lines changed

20 files changed

+20
-52
lines changed

compiler/rustc_metadata/src/native_libs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ impl<'tcx> Collector<'tcx> {
165165
feature_err(
166166
&sess.parse_sess,
167167
sym::link_arg_attribute,
168-
item.span(),
169-
"link-arg link kind is unstable",
168+
span,
169+
"link kind `link-arg` is unstable",
170170
)
171171
.emit();
172172
}

tests/run-make/linker-flags-from-attribute-flavor/Makefile

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/run-make/linker-flags-from-attribute-from-dep/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/run-make/linker-flags-from-attribute-from-dep/main.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/run-make/linker-flags-from-attribute-from-dep/native_dep_1.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/run-make/linker-flags-from-attribute-from-dep/native_dep_2.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/run-make/linker-flags-from-attribute/Makefile

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/run-make/linker-flags-from-attribute/rs.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/run-make/pass-linker-flags-flavor/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
include ../tools.mk
44

55
all:
6-
$(RUSTC) rs.rs -Z unstable-options -C linker-flavor=gnu-cc -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.*-Wl,a1.*l2.*-Wl,a2.*d1.*-Wl,a3'
7-
$(RUSTC) rs.rs -Z unstable-options -C linker-flavor=gnu-cc -l static=l1 -l link-arg:+verbatim=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*-Wl,a2.*d1.*-Wl,a3'
8-
$(RUSTC) rs.rs -Z unstable-options -C linker-flavor=ld -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"'
6+
$(RUSTC) empty.rs -Z unstable-options -C linker-flavor=gnu-cc -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.*-Wl,a1.*l2.*-Wl,a2.*d1.*-Wl,a3'
7+
$(RUSTC) empty.rs -Z unstable-options -C linker-flavor=gnu-cc -l static=l1 -l link-arg:+verbatim=a1 -l static=l2 -l link-arg=a2 -l dylib=d1 -l link-arg=a3 --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*-Wl,a2.*d1.*-Wl,a3'
8+
$(RUSTC) empty.rs -Z unstable-options -C linker-flavor=ld -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"'
9+
$(RUSTC) attribute.rs -Z unstable-options -C linker-flavor=gnu-cc --print link-args | $(CGREP) -e 'l1.*-Wl,a1.*l2.*-Wl,a2.*d1.*-Wl,a3'
10+
$(RUSTC) --cfg 'feature="verbatim"' attribute.rs -Z unstable-options -C linker-flavor=gnu-cc --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*-Wl,a2.*d1.*-Wl,a3'
11+
$(RUSTC) attribute.rs -C linker-flavor=ld --print link-args | $(CGREP) -e 'l1.*"a1".*l2.*"a2".*d1.*"a3"'

tests/run-make/linker-flags-from-attribute-flavor/verbatim.rs renamed to tests/run-make/pass-linker-flags-flavor/attribute.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#![feature(link_arg_attribute)]
22

33
#[link(kind = "static", name = "l1")]
4-
#[link(kind = "link-arg", name = "a1", modifiers = "+verbatim")]
4+
#[cfg_attr(feature = "verbatim", link(kind = "link-arg", name = "a1", modifiers = "+verbatim"))]
5+
#[cfg_attr(not(feature = "verbatim"), link(kind = "link-arg", name = "a1"))]
56
#[link(kind = "static", name = "l2")]
67
#[link(kind = "link-arg", name = "a2")]
78
#[link(kind = "dylib", name = "d1")]

0 commit comments

Comments
 (0)