From 9a2415b82284f81d2fa7d6aa5096e6d2e5d83452 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 12 May 2015 13:29:09 -0700 Subject: std: Mark rust_get_num_cpus as dllexport This function is imported across the DLL boundary by the libtest dynamic library, so it has to be marked as dllexport somehow, and for now this is done with an attribute on the function specifically. --- src/rt/rust_builtin.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rt/rust_builtin.c b/src/rt/rust_builtin.c index 5939a5a3c90..92371e90aba 100644 --- a/src/rt/rust_builtin.c +++ b/src/rt/rust_builtin.c @@ -45,6 +45,12 @@ #include "valgrind/valgrind.h" #endif +#if defined(_MSC_VER) +# define RUST_BUILTIN_API __declspec(dllexport) +#else +# define RUST_BUILTIN_API +#endif + #ifndef _WIN32 char* rust_list_dir_val(struct dirent* entry_ptr) { @@ -129,6 +135,7 @@ get_num_cpus() { } #endif +RUST_BUILTIN_API uintptr_t rust_get_num_cpus() { return get_num_cpus(); -- cgit 1.4.1-3-g733a5