File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2109,6 +2109,7 @@ extern {
21092109
21102110 pub fn LLVMWriteSMDiagnosticToString ( d : SMDiagnosticRef , s : RustStringRef ) ;
21112111
2112+ pub fn LLVMRustUseArchiveWriter ( ) -> bool ;
21122113 pub fn LLVMRustWriteArchive ( Dst : * const c_char ,
21132114 NumMembers : size_t ,
21142115 Members : * const RustArchiveMemberRef ,
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ impl<'a> ArchiveBuilder<'a> {
218218 }
219219
220220 pub fn llvm_archive_kind ( & self ) -> Option < ArchiveKind > {
221- if unsafe { llvm:: LLVMVersionMinor ( ) < 7 } {
221+ if ! unsafe { llvm:: LLVMRustUseArchiveWriter ( ) } {
222222 return None
223223 }
224224
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ typedef Archive RustArchive;
3636#define GET_ARCHIVE (a ) (a)
3737#endif
3838
39+ extern " C" bool
40+ LLVMRustUseArchiveWriter () {
41+ return LLVM_VERSION_MINOR >= 7 && !PNACL_LLVM;
42+ }
43+
3944extern " C" void *
4045LLVMRustOpenArchive (char *path) {
4146 ErrorOr<std::unique_ptr<MemoryBuffer>> buf_or = MemoryBuffer::getFile (path,
You can’t perform that action at this time.
0 commit comments