Skip to content

Commit

Permalink
std: Mark rust_get_num_cpus as dllexport
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed May 19, 2015
1 parent f5222fb commit 9a2415b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/rt/rust_builtin.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -129,6 +135,7 @@ get_num_cpus() {
}
#endif

RUST_BUILTIN_API
uintptr_t
rust_get_num_cpus() {
return get_num_cpus();
Expand Down

0 comments on commit 9a2415b

Please sign in to comment.