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.
This commit is contained in:
Alex Crichton 2015-05-12 13:29:09 -07:00
parent f5222fb892
commit 9a2415b822

View File

@ -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();