Skip to content

Commit 2d22c0c

Browse files
committed
Fix unresolved symbol error for the crate_map in libstd on os x.
1 parent d3309eb commit 2d22c0c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/rt/crate_map.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ use vec;
1616
use hashmap::HashSet;
1717
use container::MutableSet;
1818

19+
// Need to tell the linker on OS X to not barf on undefined symbols
20+
// and instead look them up at runtime, which we need to resolve
21+
// the crate_map properly.
22+
#[cfg(target_os = "macos")]
23+
#[link_args = "-undefined dynamic_lookup"]
24+
extern {}
25+
1926
extern {
2027
#[cfg(not(stage0))]
2128
#[weak_linkage]

0 commit comments

Comments
 (0)