File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2109,6 +2109,7 @@ extern {
2109
2109
2110
2110
pub fn LLVMWriteSMDiagnosticToString ( d : SMDiagnosticRef , s : RustStringRef ) ;
2111
2111
2112
+ pub fn LLVMRustUseArchiveWriter ( ) -> bool ;
2112
2113
pub fn LLVMRustWriteArchive ( Dst : * const c_char ,
2113
2114
NumMembers : size_t ,
2114
2115
Members : * const RustArchiveMemberRef ,
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ impl<'a> ArchiveBuilder<'a> {
218
218
}
219
219
220
220
pub fn llvm_archive_kind ( & self ) -> Option < ArchiveKind > {
221
- if unsafe { llvm:: LLVMVersionMinor ( ) < 7 } {
221
+ if ! unsafe { llvm:: LLVMRustUseArchiveWriter ( ) } {
222
222
return None
223
223
}
224
224
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ typedef Archive RustArchive;
36
36
#define GET_ARCHIVE (a ) (a)
37
37
#endif
38
38
39
+ extern " C" bool
40
+ LLVMRustUseArchiveWriter () {
41
+ return LLVM_VERSION_MINOR >= 7 && !PNACL_LLVM;
42
+ }
43
+
39
44
extern " C" void *
40
45
LLVMRustOpenArchive (char *path) {
41
46
ErrorOr<std::unique_ptr<MemoryBuffer>> buf_or = MemoryBuffer::getFile (path,
You can’t perform that action at this time.
0 commit comments