3 # Modelled after compile-fail/changing-crates test, but this one puts
4 # more than one (mismatching) candidate crate into the search path,
5 # which did not appear directly expressible in compile-fail/aux-build
8 # Note that we move the built libraries into target direcrtories rather than
9 # use the `--out-dir` option because the `../tools.mk` file already bakes a
10 # use of `--out-dir` into the definition of $(RUSTC).
16 # A hack to match distinct lines of output from a single run.
20 mkdir -p $(A1) $(A2) $(A3)
21 $(RUSTC) --crate-type=rlib crateA1.rs
22 mv $(TMPDIR)/$(call RLIB_GLOB,crateA) $(A1)
23 $(RUSTC) --crate-type=rlib -L $(A1) crateB.rs
24 $(RUSTC) --crate-type=rlib crateA2.rs
25 mv $(TMPDIR)/$(call RLIB_GLOB,crateA) $(A2)
26 $(RUSTC) --crate-type=rlib crateA3.rs
27 mv $(TMPDIR)/$(call RLIB_GLOB,crateA) $(A3)
28 # Ensure crateC fails to compile since A1 is "missing" and A2/A3 hashes do not match
29 $(RUSTC) -L $(A2) -L $(A3) crateC.rs >$(LOG) 2>&1 || true
31 'found possibly newer version of crate `crateA` which `crateB` depends on' \
32 'note: perhaps that crate needs to be recompiled?' \
36 # the 'crate `crateA`' will match two entries.