From 2d22c0c8e4b32d563abf2aaf5630b089b3564f27 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Thu, 19 Sep 2013 17:22:59 -0400 Subject: [PATCH] Fix unresolved symbol error for the crate_map in libstd on os x. --- src/libstd/rt/crate_map.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs index f6ebb8bcdfff..e4c3763be96a 100644 --- a/src/libstd/rt/crate_map.rs +++ b/src/libstd/rt/crate_map.rs @@ -16,6 +16,13 @@ use vec; use hashmap::HashSet; use container::MutableSet; +// Need to tell the linker on OS X to not barf on undefined symbols +// and instead look them up at runtime, which we need to resolve +// the crate_map properly. +#[cfg(target_os = "macos")] +#[link_args = "-undefined dynamic_lookup"] +extern {} + extern { #[cfg(not(stage0))] #[weak_linkage]