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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user