File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
src/test/run-make/linker-output-non-utf8 Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ -include ../tools.mk
2+
3+ # Make sure we don't ICE if the linker prints a non-UTF-8 error message.
4+
5+ # The zzz it to allow humans to tab complete or glob this thing.
6+ bad_dir := $(TMPDIR ) /zzz$$'\xff'
7+
8+ all :
9+ $(RUSTC ) library.rs
10+ mkdir $(bad_dir )
11+ mv $(call DYLIB,library) $(bad_dir )
12+ LIBRARY_PATH=$(bad_dir ) $(RUSTC ) exec.rs 2>&1 | grep this_symbol_not_defined
Original file line number Diff line number Diff line change 1+ #[ link( name="library" ) ]
2+ extern "C" {
3+ fn foo ( ) ;
4+ }
5+
6+ fn main ( ) { unsafe { foo ( ) ; } }
Original file line number Diff line number Diff line change 1+ #![ crate_type = "dylib" ]
2+
3+ extern "C" {
4+ fn this_symbol_not_defined ( ) ;
5+ }
6+
7+ pub extern "C" fn foo ( ) {
8+ unsafe { this_symbol_not_defined ( ) ; }
9+ }
You can’t perform that action at this time.
0 commit comments