Skip to content

Commit 9c877c2

Browse files
committed
Use a staticlib instead of a dylib for utf8 test
On OS X the linker doesn't like producing a dylib with undefined symbols.
1 parent 44dd8dc commit 9c877c2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/test/run-make/linker-output-non-utf8/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ bad_dir := $(TMPDIR)/zzz$$'\xff'
88
all:
99
$(RUSTC) library.rs
1010
mkdir $(bad_dir)
11-
mv $(call DYLIB,library) $(bad_dir)
11+
mv $(call STATICLIB,library) $(bad_dir)
1212
LIBRARY_PATH=$(bad_dir) $(RUSTC) exec.rs 2>&1 | grep this_symbol_not_defined

src/test/run-make/linker-output-non-utf8/library.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![crate_type = "dylib"]
11+
#![crate_type = "staticlib"]
1212

1313
extern "C" {
1414
fn this_symbol_not_defined();
1515
}
1616

17+
#[no_mangle]
1718
pub extern "C" fn foo() {
1819
unsafe { this_symbol_not_defined(); }
1920
}

0 commit comments

Comments
 (0)