diff options
| author | Michael Woerister <michaelwoerister@posteo.net> | 2017-04-27 16:12:57 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo.net> | 2017-05-08 12:31:26 +0200 |
| commit | 6a5e2a5a9eee3a504d89c014d80fd8f301226c27 (patch) | |
| tree | 6151252de6da4e37bafc4db02151463a7d60141f /src/test/incremental/remapped_paths_cc | |
| parent | 70198a0a44633c7c9d14fce2159c1f750491287b (diff) | |
| download | rust-6a5e2a5a9eee3a504d89c014d80fd8f301226c27.tar.gz rust-6a5e2a5a9eee3a504d89c014d80fd8f301226c27.zip | |
incr.comp.: Hash more pieces of crate metadata to detect changes there.
Diffstat (limited to 'src/test/incremental/remapped_paths_cc')
| -rw-r--r-- | src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs | 24 | ||||
| -rw-r--r-- | src/test/incremental/remapped_paths_cc/main.rs | 42 |
2 files changed, 66 insertions, 0 deletions
diff --git a/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs b/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs new file mode 100644 index 00000000000..09db90d618b --- /dev/null +++ b/src/test/incremental/remapped_paths_cc/auxiliary/extern_crate.rs @@ -0,0 +1,24 @@ +// Copyright 2017 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. + +// ignore-tidy-linelength + +// aux-build:extern_crate.rs +//[rpass1] compile-flags: -g +//[rpass2] compile-flags: -g +//[rpass3] compile-flags: -g -Zremap-path-prefix-from={{src-base}} -Zremap-path-prefix-to=/the/src + +#![feature(rustc_attrs)] +#![crate_type="rlib"] + +#[inline(always)] +pub fn inline_fn() { + println!("test"); +} diff --git a/src/test/incremental/remapped_paths_cc/main.rs b/src/test/incremental/remapped_paths_cc/main.rs new file mode 100644 index 00000000000..8a8c658accc --- /dev/null +++ b/src/test/incremental/remapped_paths_cc/main.rs @@ -0,0 +1,42 @@ +// Copyright 2017 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. + +// revisions:rpass1 rpass2 rpass3 +// compile-flags: -Z query-dep-graph -g +// aux-build:extern_crate.rs + + +// This test case makes sure that we detect if paths emitted into debuginfo +// are changed, even when the change happens in an external crate. + +#![feature(rustc_attrs)] + +#![rustc_partition_reused(module="main", cfg="rpass2")] +#![rustc_partition_reused(module="main-some_mod", cfg="rpass2")] +#![rustc_partition_reused(module="main", cfg="rpass3")] +#![rustc_partition_translated(module="main-some_mod", cfg="rpass3")] + +extern crate extern_crate; + +#[rustc_clean(label="TransCrateItem", cfg="rpass2")] +#[rustc_clean(label="TransCrateItem", cfg="rpass3")] +fn main() { + some_mod::some_fn(); +} + +mod some_mod { + use extern_crate; + + #[rustc_clean(label="TransCrateItem", cfg="rpass2")] + #[rustc_dirty(label="TransCrateItem", cfg="rpass3")] + pub fn some_fn() { + extern_crate::inline_fn(); + } +} |
