diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-05 09:13:28 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-11 09:32:08 +0000 |
| commit | cf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch) | |
| tree | 40a88d9a46aaf3e8870676eb2538378b75a263eb /tests/incremental/remapped_paths_cc | |
| parent | ca855e6e42787ecd062d81d53336fe6788ef51a9 (diff) | |
| download | rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip | |
Move /src/test to /tests
Diffstat (limited to 'tests/incremental/remapped_paths_cc')
| -rw-r--r-- | tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs | 11 | ||||
| -rw-r--r-- | tests/incremental/remapped_paths_cc/main.rs | 28 |
2 files changed, 39 insertions, 0 deletions
diff --git a/tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs b/tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs new file mode 100644 index 00000000000..627b99445ea --- /dev/null +++ b/tests/incremental/remapped_paths_cc/auxiliary/extern_crate.rs @@ -0,0 +1,11 @@ +//[rpass1] compile-flags: -g +//[rpass2] compile-flags: -g +//[rpass3] compile-flags: -g --remap-path-prefix={{src-base}}=/the/src + +#![feature(rustc_attrs)] +#![crate_type="rlib"] + +#[inline(always)] +pub fn inline_fn() { + println!("test"); +} diff --git a/tests/incremental/remapped_paths_cc/main.rs b/tests/incremental/remapped_paths_cc/main.rs new file mode 100644 index 00000000000..b01f02444ea --- /dev/null +++ b/tests/incremental/remapped_paths_cc/main.rs @@ -0,0 +1,28 @@ +// revisions:rpass1 rpass2 rpass3 +// compile-flags: -Z query-dep-graph -g +// aux-build:extern_crate.rs + +// ignore-asmjs wasm2js does not support source maps yet +// 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_codegened(module="main-some_mod", cfg="rpass3")] + +extern crate extern_crate; + +fn main() { + some_mod::some_fn(); +} + +mod some_mod { + use extern_crate; + + pub fn some_fn() { + extern_crate::inline_fn(); + } +} |
