Auto merge of #33450 - SiegeLord:dep_info_no_analysis, r=nrc

Make --emit dep-info work correctly with -Z no-analysis again.

Previously, it would attempt to resolve some external crates that weren't necessary for dep-info output.

Fixes #33231.
This commit is contained in:
bors 2016-05-12 19:52:51 -07:00
commit 01ed700640
6 changed files with 97 additions and 45 deletions

View file

@ -0,0 +1,6 @@
-include ../tools.mk
all:
$(RUSTC) -o $(TMPDIR)/input.dd -Z no-analysis --emit dep-info input.rs
sed -i'.bak' 's/^.*input.dd/input.dd/g' $(TMPDIR)/input.dd
diff -u $(TMPDIR)/input.dd input.dd

View file

@ -0,0 +1,3 @@
input.dd: input.rs
input.rs:

View file

@ -0,0 +1,14 @@
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// Tests that dep info can be emitted without resolving external crates.
extern crate not_there;
fn main() {}