3 # This is a whitelist of files which are stable crates or simply are not crates,
4 # we don't check for the instability of these crates as they're all stable!
13 clang_rt.%_dynamic.dylib
15 # Generate a list of all crates in the sysroot. To do this we list all files in
16 # rustc's sysroot, look at the filename, strip everything after the `-`, and
17 # strip the leading `lib` (if present)
18 SYSROOT := $(shell $(RUSTC) --print sysroot)
19 LIBS := $(wildcard $(SYSROOT)/lib/rustlib/$(TARGET)/lib/*)
20 LIBS := $(foreach lib,$(LIBS),$(notdir $(lib)))
21 LIBS := $(foreach lib,$(LIBS),$(word 1,$(subst -, ,$(lib))))
22 LIBS := $(foreach lib,$(LIBS),$(patsubst lib%,%,$(lib)))
23 LIBS := $(filter-out $(STABLE_CRATES),$(LIBS))
25 all: $(foreach lib,$(LIBS),check-crate-$(lib)-is-unstable)
27 check-crate-%-is-unstable:
28 @echo verifying $* is an unstable crate
29 @echo 'extern crate $*;' | \
30 $(RUSTC) - --crate-type rlib 2>&1 | cat > $(TMPDIR)/$*; \
32 @grep -q 'use of unstable library feature' $(TMPDIR)/$* || \
33 (echo crate $* is not unstable && \