about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-05-12 13:29:09 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-05-19 10:53:07 -0700
commit9a2415b82284f81d2fa7d6aa5096e6d2e5d83452 (patch)
tree26f34ec1ad10fe07e5e2119f6851f7823438af4f /src/rt
parentf5222fb892be00f2b3e4dd8b83c5277e94ebbbba (diff)
downloadrust-9a2415b82284f81d2fa7d6aa5096e6d2e5d83452.tar.gz
rust-9a2415b82284f81d2fa7d6aa5096e6d2e5d83452.zip
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.
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_builtin.c7
1 files changed, 7 insertions, 0 deletions
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();