about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-05-11 21:07:38 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-05-19 10:53:07 -0700
commit847c8520b14e3ae9aec26a33f70750a071d3f18d (patch)
treec90aa19d0cb6b57bed2c1f01165e05013eff477a /src/rustllvm/RustWrapper.cpp
parentb538189ba0abb77658c7b082d2d541daaaa7f80a (diff)
downloadrust-847c8520b14e3ae9aec26a33f70750a071d3f18d.tar.gz
rust-847c8520b14e3ae9aec26a33f70750a071d3f18d.zip
rustc_llvm: Don't export constants across dlls
For imports of constants across DLLs to work on Windows it *requires* that the
import be marked with `dllimport` (unlike functions where the marker is
optional, but strongly recommended). This currently isn't working for importing
FFI constants across boundaries, however, so the one constant exported from
`rustc_llvm.dll` is now a function to be called instead.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 5a2d1ec4207..66db7326d21 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -233,7 +233,9 @@ DIT unwrapDI(LLVMMetadataRef ref) {
     return DIT(ref ? unwrap<MDNode>(ref) : NULL);
 }
 
-extern "C" const uint32_t LLVMRustDebugMetadataVersion = DEBUG_METADATA_VERSION;
+extern "C" const uint32_t LLVMRustDebugMetadataVersion() {
+    return DEBUG_METADATA_VERSION;
+}
 
 extern "C" void LLVMRustAddModuleFlag(LLVMModuleRef M,
                                       const char *name,