mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
test for immediate symbol name hashing
This commit is contained in:
parent
87debd9328
commit
ab0a87243e
7
src/test/run-make/a-b-a-linker-guard/Makefile
Normal file
7
src/test/run-make/a-b-a-linker-guard/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
-include ../tools.mk
|
||||
|
||||
all:
|
||||
$(RUSTC) a.rs --cfg x -C prefer-dynamic
|
||||
$(RUSTC) b.rs -C prefer-dynamic
|
||||
$(RUSTC) a.rs --cfg y -C prefer-dynamic
|
||||
$(call RUN,b) 2>&1 | grep "undefined symbol"
|
10
src/test/run-make/a-b-a-linker-guard/a.rs
Normal file
10
src/test/run-make/a-b-a-linker-guard/a.rs
Normal file
@ -0,0 +1,10 @@
|
||||
#![crate_name = "a"]
|
||||
#![crate_type = "dylib"]
|
||||
|
||||
#[cfg(x)]
|
||||
pub fn foo(x: u32) { }
|
||||
|
||||
#[cfg(y)]
|
||||
pub fn foo(x: i32) { }
|
||||
|
||||
|
7
src/test/run-make/a-b-a-linker-guard/b.rs
Normal file
7
src/test/run-make/a-b-a-linker-guard/b.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#![crate_name = "b"]
|
||||
|
||||
extern crate a;
|
||||
|
||||
fn main() {
|
||||
a::foo(22_u32);
|
||||
}
|
Loading…
Reference in New Issue
Block a user