pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libLLVM: bump to version 13



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Thu Dec 16 11:34:43 2021 +0100
Changeset:	67c3ce9f8f01659fabd29963b6a81d33db7ef200

Modified Files:
	libLLVM/Makefile
	libLLVM/PLIST
	libLLVM/buildlink3.mk
	libLLVM/distinfo
	libLLVM/patches/patch-cmake_modules_AddLLVM.cmake
	libLLVM/patches/patch-cmake_modules_CMakeLists.txt
	libLLVM/patches/patch-tools_llvm-shlib_CMakeLists.txt

Log Message:
libLLVM: bump to version 13

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=67c3ce9f8f01659fabd29963b6a81d33db7ef200

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libLLVM/Makefile                                   |  9 ++-
 libLLVM/PLIST                                      | 94 ++++++++++++++++------
 libLLVM/buildlink3.mk                              |  2 +-
 libLLVM/distinfo                                   | 12 +--
 libLLVM/patches/patch-cmake_modules_AddLLVM.cmake  | 43 ++++------
 libLLVM/patches/patch-cmake_modules_CMakeLists.txt |  6 +-
 .../patches/patch-tools_llvm-shlib_CMakeLists.txt  | 18 ++---
 7 files changed, 111 insertions(+), 73 deletions(-)

diffs:
diff --git a/libLLVM/Makefile b/libLLVM/Makefile
index f6c9e8e90c..90318ab819 100644
--- a/libLLVM/Makefile
+++ b/libLLVM/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.37 2021/05/24 19:52:33 wiz Exp $
 
-DISTNAME=	llvm-12.0.1.src
+DISTNAME=	llvm-13.0.0.src
 PKGNAME=	${DISTNAME:S/llvm/libLLVM/:S/.src//}
 CATEGORIES=	lang devel
 MASTER_SITES=	http://llvm.org/releases/${PKGVERSION_NOREV}/
@@ -50,9 +50,10 @@ CMAKE_ARGS.Darwin+=	-DCMAKE_LIBTOOL=/usr/bin/libtool
 	llvm_strings llvm_symbolizer llvm_undname llvm_xray		\
 	llvm_yaml_numeric_parser_fuzzer lto msbuild obj2yaml		\
 	opt opt_viewer remarks_shlib sancov sanstats			\
-	verify_uselistorder xcode_toolchain yaml2obj \
-	llvm_ml llvm_profgen llvm_reduce llvm_gsymutil split_file \
-	llvm_libtool_darwin llvm_ifs llvm_dwarfdump
+	verify_uselistorder xcode_toolchain yaml2obj			\
+	llvm_ml llvm_profgen llvm_reduce llvm_gsymutil split_file	\
+	llvm_libtool_darwin llvm_ifs llvm_dwarfdump llvm_sim		\
+	llvm_tapi_diff
 
 CMAKE_ARGS+=	-DLLVM_TOOL_${tool:tu}_BUILD=OFF
 .endfor
diff --git a/libLLVM/PLIST b/libLLVM/PLIST
index b0f8dc2578..cb324e9f10 100644
--- a/libLLVM/PLIST
+++ b/libLLVM/PLIST
@@ -27,6 +27,7 @@ include/libLLVM/llvm-c/Transforms/AggressiveInstCombine.h
 include/libLLVM/llvm-c/Transforms/Coroutines.h
 include/libLLVM/llvm-c/Transforms/IPO.h
 include/libLLVM/llvm-c/Transforms/InstCombine.h
+include/libLLVM/llvm-c/Transforms/PassBuilder.h
 include/libLLVM/llvm-c/Transforms/PassManagerBuilder.h
 include/libLLVM/llvm-c/Transforms/Scalar.h
 include/libLLVM/llvm-c/Transforms/Utils.h
@@ -81,6 +82,7 @@ include/libLLVM/llvm/ADT/PriorityQueue.h
 include/libLLVM/llvm/ADT/PriorityWorklist.h
 include/libLLVM/llvm/ADT/SCCIterator.h
 include/libLLVM/llvm/ADT/STLExtras.h
+include/libLLVM/llvm/ADT/STLForwardCompat.h
 include/libLLVM/llvm/ADT/ScopeExit.h
 include/libLLVM/llvm/ADT/ScopedHashTable.h
 include/libLLVM/llvm/ADT/Sequence.h
@@ -205,7 +207,9 @@ include/libLLVM/llvm/Analysis/MustExecute.h
 include/libLLVM/llvm/Analysis/ObjCARCAliasAnalysis.h
 include/libLLVM/llvm/Analysis/ObjCARCAnalysisUtils.h
 include/libLLVM/llvm/Analysis/ObjCARCInstKind.h
+include/libLLVM/llvm/Analysis/ObjCARCUtil.h
 include/libLLVM/llvm/Analysis/OptimizationRemarkEmitter.h
+include/libLLVM/llvm/Analysis/OverflowInstAnalysis.h
 include/libLLVM/llvm/Analysis/PHITransAddr.h
 include/libLLVM/llvm/Analysis/Passes.h
 include/libLLVM/llvm/Analysis/PhiValues.h
@@ -245,6 +249,9 @@ include/libLLVM/llvm/Analysis/ValueLatticeUtils.h
 include/libLLVM/llvm/Analysis/ValueTracking.h
 include/libLLVM/llvm/Analysis/VecFuncs.def
 include/libLLVM/llvm/Analysis/VectorUtils.h
+include/libLLVM/llvm/AsmParser/LLLexer.h
+include/libLLVM/llvm/AsmParser/LLParser.h
+include/libLLVM/llvm/AsmParser/LLToken.h
 include/libLLVM/llvm/AsmParser/Parser.h
 include/libLLVM/llvm/AsmParser/SlotMapping.h
 include/libLLVM/llvm/BinaryFormat/AMDGPUMetadataVerifier.h
@@ -262,6 +269,7 @@ include/libLLVM/llvm/BinaryFormat/ELFRelocs/BPF.def
 include/libLLVM/llvm/BinaryFormat/ELFRelocs/CSKY.def
 include/libLLVM/llvm/BinaryFormat/ELFRelocs/Hexagon.def
 include/libLLVM/llvm/BinaryFormat/ELFRelocs/Lanai.def
+include/libLLVM/llvm/BinaryFormat/ELFRelocs/M68k.def
 include/libLLVM/llvm/BinaryFormat/ELFRelocs/MSP430.def
 include/libLLVM/llvm/BinaryFormat/ELFRelocs/Mips.def
 include/libLLVM/llvm/BinaryFormat/ELFRelocs/PowerPC.def
@@ -304,7 +312,6 @@ include/libLLVM/llvm/CodeGen/AsmPrinterHandler.h
 include/libLLVM/llvm/CodeGen/AtomicExpandUtils.h
 include/libLLVM/llvm/CodeGen/BasicBlockSectionUtils.h
 include/libLLVM/llvm/CodeGen/BasicTTIImpl.h
-include/libLLVM/llvm/CodeGen/BuiltinGCs.h
 include/libLLVM/llvm/CodeGen/CSEConfigBase.h
 include/libLLVM/llvm/CodeGen/CalcSpillWeights.h
 include/libLLVM/llvm/CodeGen/CallingConvLower.h
@@ -321,27 +328,28 @@ include/libLLVM/llvm/CodeGen/DwarfStringPoolEntry.h
 include/libLLVM/llvm/CodeGen/EdgeBundles.h
 include/libLLVM/llvm/CodeGen/ExecutionDomainFix.h
 include/libLLVM/llvm/CodeGen/ExpandReductions.h
+include/libLLVM/llvm/CodeGen/ExpandVectorPredication.h
 include/libLLVM/llvm/CodeGen/FastISel.h
 include/libLLVM/llvm/CodeGen/FaultMaps.h
 include/libLLVM/llvm/CodeGen/FunctionLoweringInfo.h
 include/libLLVM/llvm/CodeGen/GCMetadata.h
 include/libLLVM/llvm/CodeGen/GCMetadataPrinter.h
-include/libLLVM/llvm/CodeGen/GCStrategy.h
 include/libLLVM/llvm/CodeGen/GlobalISel/CSEInfo.h
 include/libLLVM/llvm/CodeGen/GlobalISel/CSEMIRBuilder.h
 include/libLLVM/llvm/CodeGen/GlobalISel/CallLowering.h
 include/libLLVM/llvm/CodeGen/GlobalISel/Combiner.h
 include/libLLVM/llvm/CodeGen/GlobalISel/CombinerHelper.h
 include/libLLVM/llvm/CodeGen/GlobalISel/CombinerInfo.h
-include/libLLVM/llvm/CodeGen/GlobalISel/ConstantFoldingMIRBuilder.h
 include/libLLVM/llvm/CodeGen/GlobalISel/GISelChangeObserver.h
 include/libLLVM/llvm/CodeGen/GlobalISel/GISelKnownBits.h
 include/libLLVM/llvm/CodeGen/GlobalISel/GISelWorkList.h
+include/libLLVM/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h
 include/libLLVM/llvm/CodeGen/GlobalISel/IRTranslator.h
 include/libLLVM/llvm/CodeGen/GlobalISel/InlineAsmLowering.h
 include/libLLVM/llvm/CodeGen/GlobalISel/InstructionSelect.h
 include/libLLVM/llvm/CodeGen/GlobalISel/InstructionSelector.h
 include/libLLVM/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
+include/libLLVM/llvm/CodeGen/GlobalISel/LegacyLegalizerInfo.h
 include/libLLVM/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
 include/libLLVM/llvm/CodeGen/GlobalISel/Legalizer.h
 include/libLLVM/llvm/CodeGen/GlobalISel/LegalizerHelper.h
@@ -376,6 +384,7 @@ include/libLLVM/llvm/CodeGen/LiveVariables.h
 include/libLLVM/llvm/CodeGen/LoopTraversal.h
 include/libLLVM/llvm/CodeGen/LowLevelType.h
 include/libLLVM/llvm/CodeGen/MBFIWrapper.h
+include/libLLVM/llvm/CodeGen/MIRFSDiscriminator.h
 include/libLLVM/llvm/CodeGen/MIRFormatter.h
 include/libLLVM/llvm/CodeGen/MIRParser/MIParser.h
 include/libLLVM/llvm/CodeGen/MIRParser/MIRParser.h
@@ -402,6 +411,7 @@ include/libLLVM/llvm/CodeGen/MachineLoopUtils.h
 include/libLLVM/llvm/CodeGen/MachineMemOperand.h
 include/libLLVM/llvm/CodeGen/MachineModuleInfo.h
 include/libLLVM/llvm/CodeGen/MachineModuleInfoImpls.h
+include/libLLVM/llvm/CodeGen/MachineModuleSlotTracker.h
 include/libLLVM/llvm/CodeGen/MachineOperand.h
 include/libLLVM/llvm/CodeGen/MachineOptimizationRemarkEmitter.h
 include/libLLVM/llvm/CodeGen/MachineOutliner.h
@@ -435,6 +445,7 @@ include/libLLVM/llvm/CodeGen/RDFGraph.h
 include/libLLVM/llvm/CodeGen/RDFLiveness.h
 include/libLLVM/llvm/CodeGen/RDFRegisters.h
 include/libLLVM/llvm/CodeGen/ReachingDefAnalysis.h
+include/libLLVM/llvm/CodeGen/RegAllocCommon.h
 include/libLLVM/llvm/CodeGen/RegAllocPBQP.h
 include/libLLVM/llvm/CodeGen/RegAllocRegistry.h
 include/libLLVM/llvm/CodeGen/Register.h
@@ -442,6 +453,7 @@ include/libLLVM/llvm/CodeGen/RegisterClassInfo.h
 include/libLLVM/llvm/CodeGen/RegisterPressure.h
 include/libLLVM/llvm/CodeGen/RegisterScavenging.h
 include/libLLVM/llvm/CodeGen/RegisterUsageInfo.h
+include/libLLVM/llvm/CodeGen/ReplaceWithVeclib.h
 include/libLLVM/llvm/CodeGen/ResourcePriorityQueue.h
 include/libLLVM/llvm/CodeGen/RuntimeLibcalls.h
 include/libLLVM/llvm/CodeGen/SDNodeProperties.td
@@ -492,6 +504,9 @@ include/libLLVM/llvm/DWARFLinker/DWARFLinker.h
 include/libLLVM/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
 include/libLLVM/llvm/DWARFLinker/DWARFLinkerDeclContext.h
 include/libLLVM/llvm/DWARFLinker/DWARFStreamer.h
+include/libLLVM/llvm/DWP/DWP.h
+include/libLLVM/llvm/DWP/DWPError.h
+include/libLLVM/llvm/DWP/DWPStringPool.h
 include/libLLVM/llvm/DebugInfo/CodeView/AppendingTypeTableBuilder.h
 include/libLLVM/llvm/DebugInfo/CodeView/CVRecord.h
 include/libLLVM/llvm/DebugInfo/CodeView/CVSymbolVisitor.h
@@ -744,6 +759,7 @@ include/libLLVM/llvm/ExecutionEngine/Interpreter.h
 include/libLLVM/llvm/ExecutionEngine/JITEventListener.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/EHFrameSupport.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/ELF.h
+include/libLLVM/llvm/ExecutionEngine/JITLink/ELF_riscv.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/ELF_x86_64.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/JITLink.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/JITLinkDylib.h
@@ -751,6 +767,8 @@ include/libLLVM/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/MachO.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/MachO_arm64.h
 include/libLLVM/llvm/ExecutionEngine/JITLink/MachO_x86_64.h
+include/libLLVM/llvm/ExecutionEngine/JITLink/riscv.h
+include/libLLVM/llvm/ExecutionEngine/JITLink/x86_64.h
 include/libLLVM/llvm/ExecutionEngine/JITSymbol.h
 include/libLLVM/llvm/ExecutionEngine/MCJIT.h
 include/libLLVM/llvm/ExecutionEngine/OProfileWrapper.h
@@ -758,13 +776,20 @@ include/libLLVM/llvm/ExecutionEngine/ObjectCache.h
 include/libLLVM/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/CompileUtils.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Core.h
+include/libLLVM/llvm/ExecutionEngine/Orc/DebugObjectManagerPlugin.h
 include/libLLVM/llvm/ExecutionEngine/Orc/DebugUtils.h
+include/libLLVM/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
+include/libLLVM/llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h
+include/libLLVM/llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h
+include/libLLVM/llvm/ExecutionEngine/Orc/EPCIndirectionUtils.h
 include/libLLVM/llvm/ExecutionEngine/Orc/ExecutionUtils.h
+include/libLLVM/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
 include/libLLVM/llvm/ExecutionEngine/Orc/IRCompileLayer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/IRTransformLayer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/IndirectionUtils.h
 include/libLLVM/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
 include/libLLVM/llvm/ExecutionEngine/Orc/LLJIT.h
+include/libLLVM/llvm/ExecutionEngine/Orc/LLVMSPSSerializers.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Layer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/LazyReexports.h
 include/libLLVM/llvm/ExecutionEngine/Orc/MachOPlatform.h
@@ -772,27 +797,27 @@ include/libLLVM/llvm/ExecutionEngine/Orc/Mangling.h
 include/libLLVM/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/OrcABISupport.h
-include/libLLVM/llvm/ExecutionEngine/Orc/OrcRPCTargetProcessControl.h
+include/libLLVM/llvm/ExecutionEngine/Orc/OrcRPCExecutorProcessControl.h
 include/libLLVM/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
 include/libLLVM/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h
 include/libLLVM/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
+include/libLLVM/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Shared/FDRawByteChannel.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Shared/OrcError.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Shared/RPCUtils.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Shared/RawByteChannel.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Shared/Serialization.h
+include/libLLVM/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h
+include/libLLVM/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
 include/libLLVM/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
 include/libLLVM/llvm/ExecutionEngine/Orc/Speculation.h
 include/libLLVM/llvm/ExecutionEngine/Orc/SymbolStringPool.h
-include/libLLVM/llvm/ExecutionEngine/Orc/TPCDynamicLibrarySearchGenerator.h
-include/libLLVM/llvm/ExecutionEngine/Orc/TPCEHFrameRegistrar.h
-include/libLLVM/llvm/ExecutionEngine/Orc/TPCIndirectionUtils.h
+include/libLLVM/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h
 include/libLLVM/llvm/ExecutionEngine/Orc/TargetProcess/OrcRPCTPCServer.h
 include/libLLVM/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h
 include/libLLVM/llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h
-include/libLLVM/llvm/ExecutionEngine/Orc/TargetProcessControl.h
 include/libLLVM/llvm/ExecutionEngine/Orc/ThreadSafeModule.h
 include/libLLVM/llvm/ExecutionEngine/OrcMCJITReplacement.h
 include/libLLVM/llvm/ExecutionEngine/OrcV1Deprecation.h
@@ -828,6 +853,7 @@ include/libLLVM/llvm/IR/Attributes.inc
 include/libLLVM/llvm/IR/Attributes.td
 include/libLLVM/llvm/IR/AutoUpgrade.h
 include/libLLVM/llvm/IR/BasicBlock.h
+include/libLLVM/llvm/IR/BuiltinGCs.h
 include/libLLVM/llvm/IR/CFG.h
 include/libLLVM/llvm/IR/CallingConv.h
 include/libLLVM/llvm/IR/Comdat.h
@@ -852,6 +878,7 @@ include/libLLVM/llvm/IR/FPEnv.h
 include/libLLVM/llvm/IR/FixedMetadataKinds.def
 include/libLLVM/llvm/IR/FixedPointBuilder.h
 include/libLLVM/llvm/IR/Function.h
+include/libLLVM/llvm/IR/GCStrategy.h
 include/libLLVM/llvm/IR/GVMaterializer.h
 include/libLLVM/llvm/IR/GetElementPtrTypeIterator.h
 include/libLLVM/llvm/IR/GlobalAlias.h
@@ -956,8 +983,8 @@ include/libLLVM/llvm/IR/Verifier.h
 include/libLLVM/llvm/IRReader/IRReader.h
 include/libLLVM/llvm/InitializePasses.h
 include/libLLVM/llvm/InterfaceStub/ELFObjHandler.h
-include/libLLVM/llvm/InterfaceStub/ELFStub.h
-include/libLLVM/llvm/InterfaceStub/TBEHandler.h
+include/libLLVM/llvm/InterfaceStub/IFSHandler.h
+include/libLLVM/llvm/InterfaceStub/IFSStub.h
 include/libLLVM/llvm/LTO/Caching.h
 include/libLLVM/llvm/LTO/Config.h
 include/libLLVM/llvm/LTO/LTO.h
@@ -1028,6 +1055,7 @@ include/libLLVM/llvm/MC/MCSchedule.h
 include/libLLVM/llvm/MC/MCSection.h
 include/libLLVM/llvm/MC/MCSectionCOFF.h
 include/libLLVM/llvm/MC/MCSectionELF.h
+include/libLLVM/llvm/MC/MCSectionGOFF.h
 include/libLLVM/llvm/MC/MCSectionMachO.h
 include/libLLVM/llvm/MC/MCSectionWasm.h
 include/libLLVM/llvm/MC/MCSectionXCOFF.h
@@ -1036,6 +1064,7 @@ include/libLLVM/llvm/MC/MCSubtargetInfo.h
 include/libLLVM/llvm/MC/MCSymbol.h
 include/libLLVM/llvm/MC/MCSymbolCOFF.h
 include/libLLVM/llvm/MC/MCSymbolELF.h
+include/libLLVM/llvm/MC/MCSymbolGOFF.h
 include/libLLVM/llvm/MC/MCSymbolMachO.h
 include/libLLVM/llvm/MC/MCSymbolWasm.h
 include/libLLVM/llvm/MC/MCSymbolXCOFF.h
@@ -1056,6 +1085,7 @@ include/libLLVM/llvm/MC/StringTableBuilder.h
 include/libLLVM/llvm/MC/SubtargetFeature.h
 include/libLLVM/llvm/MCA/CodeEmitter.h
 include/libLLVM/llvm/MCA/Context.h
+include/libLLVM/llvm/MCA/CustomBehaviour.h
 include/libLLVM/llvm/MCA/HWEventListener.h
 include/libLLVM/llvm/MCA/HardwareUnits/HardwareUnit.h
 include/libLLVM/llvm/MCA/HardwareUnits/LSUnit.h
@@ -1070,6 +1100,7 @@ include/libLLVM/llvm/MCA/SourceMgr.h
 include/libLLVM/llvm/MCA/Stages/DispatchStage.h
 include/libLLVM/llvm/MCA/Stages/EntryStage.h
 include/libLLVM/llvm/MCA/Stages/ExecuteStage.h
+include/libLLVM/llvm/MCA/Stages/InOrderIssueStage.h
 include/libLLVM/llvm/MCA/Stages/InstructionTables.h
 include/libLLVM/llvm/MCA/Stages/MicroOpQueueStage.h
 include/libLLVM/llvm/MCA/Stages/RetireStage.h
@@ -1087,6 +1118,7 @@ include/libLLVM/llvm/Object/ELF.h
 include/libLLVM/llvm/Object/ELFObjectFile.h
 include/libLLVM/llvm/Object/ELFTypes.h
 include/libLLVM/llvm/Object/Error.h
+include/libLLVM/llvm/Object/FaultMapParser.h
 include/libLLVM/llvm/Object/IRObjectFile.h
 include/libLLVM/llvm/Object/IRSymtab.h
 include/libLLVM/llvm/Object/MachO.h
@@ -1176,7 +1208,9 @@ include/libLLVM/llvm/Support/AllocatorBase.h
 include/libLLVM/llvm/Support/ArrayRecycler.h
 include/libLLVM/llvm/Support/Atomic.h
 include/libLLVM/llvm/Support/AtomicOrdering.h
+include/libLLVM/llvm/Support/AutoConvert.h
 include/libLLVM/llvm/Support/Automaton.h
+include/libLLVM/llvm/Support/BCD.h
 include/libLLVM/llvm/Support/Base64.h
 include/libLLVM/llvm/Support/BinaryByteStream.h
 include/libLLVM/llvm/Support/BinaryItemStream.h
@@ -1212,6 +1246,7 @@ include/libLLVM/llvm/Support/DataExtractor.h
 include/libLLVM/llvm/Support/DataTypes.h
 include/libLLVM/llvm/Support/Debug.h
 include/libLLVM/llvm/Support/DebugCounter.h
+include/libLLVM/llvm/Support/Discriminator.h
 include/libLLVM/llvm/Support/DynamicLibrary.h
 include/libLLVM/llvm/Support/ELFAttributeParser.h
 include/libLLVM/llvm/Support/ELFAttributes.h
@@ -1287,6 +1322,7 @@ include/libLLVM/llvm/Support/Regex.h
 include/libLLVM/llvm/Support/Registry.h
 include/libLLVM/llvm/Support/ReverseIteration.h
 include/libLLVM/llvm/Support/SHA1.h
+include/libLLVM/llvm/Support/SHA256.h
 include/libLLVM/llvm/Support/SMLoc.h
 include/libLLVM/llvm/Support/SMTAPI.h
 include/libLLVM/llvm/Support/SaveAndRestore.h
@@ -1373,16 +1409,16 @@ include/libLLVM/llvm/Target/TargetSelectionDAG.td
 include/libLLVM/llvm/Testing/Support/Annotations.h
 include/libLLVM/llvm/Testing/Support/Error.h
 include/libLLVM/llvm/Testing/Support/SupportHelpers.h
-include/libLLVM/llvm/TextAPI/MachO/Architecture.def
-include/libLLVM/llvm/TextAPI/MachO/Architecture.h
-include/libLLVM/llvm/TextAPI/MachO/ArchitectureSet.h
-include/libLLVM/llvm/TextAPI/MachO/InterfaceFile.h
-include/libLLVM/llvm/TextAPI/MachO/PackedVersion.h
-include/libLLVM/llvm/TextAPI/MachO/Platform.h
-include/libLLVM/llvm/TextAPI/MachO/Symbol.h
-include/libLLVM/llvm/TextAPI/MachO/Target.h
-include/libLLVM/llvm/TextAPI/MachO/TextAPIReader.h
-include/libLLVM/llvm/TextAPI/MachO/TextAPIWriter.h
+include/libLLVM/llvm/TextAPI/Architecture.def
+include/libLLVM/llvm/TextAPI/Architecture.h
+include/libLLVM/llvm/TextAPI/ArchitectureSet.h
+include/libLLVM/llvm/TextAPI/InterfaceFile.h
+include/libLLVM/llvm/TextAPI/PackedVersion.h
+include/libLLVM/llvm/TextAPI/Platform.h
+include/libLLVM/llvm/TextAPI/Symbol.h
+include/libLLVM/llvm/TextAPI/Target.h
+include/libLLVM/llvm/TextAPI/TextAPIReader.h
+include/libLLVM/llvm/TextAPI/TextAPIWriter.h
 include/libLLVM/llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h
 include/libLLVM/llvm/ToolDrivers/llvm-lib/LibDriver.h
 include/libLLVM/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h
@@ -1392,7 +1428,6 @@ include/libLLVM/llvm/Transforms/Coroutines/CoroCleanup.h
 include/libLLVM/llvm/Transforms/Coroutines/CoroEarly.h
 include/libLLVM/llvm/Transforms/Coroutines/CoroElide.h
 include/libLLVM/llvm/Transforms/Coroutines/CoroSplit.h
-include/libLLVM/llvm/Transforms/HelloNew/HelloWorld.h
 include/libLLVM/llvm/Transforms/IPO.h
 include/libLLVM/llvm/Transforms/IPO/AlwaysInliner.h
 include/libLLVM/llvm/Transforms/IPO/Annotation2Metadata.h
@@ -1421,6 +1456,7 @@ include/libLLVM/llvm/Transforms/IPO/MergeFunctions.h
 include/libLLVM/llvm/Transforms/IPO/OpenMPOpt.h
 include/libLLVM/llvm/Transforms/IPO/PartialInlining.h
 include/libLLVM/llvm/Transforms/IPO/PassManagerBuilder.h
+include/libLLVM/llvm/Transforms/IPO/ProfiledCallGraph.h
 include/libLLVM/llvm/Transforms/IPO/SCCP.h
 include/libLLVM/llvm/Transforms/IPO/SampleContextTracker.h
 include/libLLVM/llvm/Transforms/IPO/SampleProfile.h
@@ -1436,6 +1472,7 @@ include/libLLVM/llvm/Transforms/InstCombine/InstCombiner.h
 include/libLLVM/llvm/Transforms/Instrumentation.h
 include/libLLVM/llvm/Transforms/Instrumentation/AddressSanitizer.h
 include/libLLVM/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h
+include/libLLVM/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
 include/libLLVM/llvm/Transforms/Instrumentation/BoundsChecking.h
 include/libLLVM/llvm/Transforms/Instrumentation/CGProfile.h
 include/libLLVM/llvm/Transforms/Instrumentation/ControlHeightReduction.h
@@ -1461,6 +1498,7 @@ include/libLLVM/llvm/Transforms/Scalar/ConstantHoisting.h
 include/libLLVM/llvm/Transforms/Scalar/ConstraintElimination.h
 include/libLLVM/llvm/Transforms/Scalar/CorrelatedValuePropagation.h
 include/libLLVM/llvm/Transforms/Scalar/DCE.h
+include/libLLVM/llvm/Transforms/Scalar/DFAJumpThreading.h
 include/libLLVM/llvm/Transforms/Scalar/DeadStoreElimination.h
 include/libLLVM/llvm/Transforms/Scalar/DivRemPairs.h
 include/libLLVM/llvm/Transforms/Scalar/EarlyCSE.h
@@ -1476,6 +1514,7 @@ include/libLLVM/llvm/Transforms/Scalar/InstSimplifyPass.h
 include/libLLVM/llvm/Transforms/Scalar/JumpThreading.h
 include/libLLVM/llvm/Transforms/Scalar/LICM.h
 include/libLLVM/llvm/Transforms/Scalar/LoopAccessAnalysisPrinter.h
+include/libLLVM/llvm/Transforms/Scalar/LoopBoundSplit.h
 include/libLLVM/llvm/Transforms/Scalar/LoopDataPrefetch.h
 include/libLLVM/llvm/Transforms/Scalar/LoopDeletion.h
 include/libLLVM/llvm/Transforms/Scalar/LoopDistribute.h
@@ -1519,7 +1558,6 @@ include/libLLVM/llvm/Transforms/Scalar/SeparateConstOffsetFromGEP.h
 include/libLLVM/llvm/Transforms/Scalar/SimpleLoopUnswitch.h
 include/libLLVM/llvm/Transforms/Scalar/SimplifyCFG.h
 include/libLLVM/llvm/Transforms/Scalar/Sink.h
-include/libLLVM/llvm/Transforms/Scalar/SpeculateAroundPHIs.h
 include/libLLVM/llvm/Transforms/Scalar/SpeculativeExecution.h
 include/libLLVM/llvm/Transforms/Scalar/StraightLineStrengthReduce.h
 include/libLLVM/llvm/Transforms/Scalar/StructurizeCFG.h
@@ -1551,6 +1589,7 @@ include/libLLVM/llvm/Transforms/Utils/FunctionComparator.h
 include/libLLVM/llvm/Transforms/Utils/FunctionImportUtils.h
 include/libLLVM/llvm/Transforms/Utils/GlobalStatus.h
 include/libLLVM/llvm/Transforms/Utils/GuardUtils.h
+include/libLLVM/llvm/Transforms/Utils/HelloWorld.h
 include/libLLVM/llvm/Transforms/Utils/InjectTLIMappings.h
 include/libLLVM/llvm/Transforms/Utils/InstructionNamer.h
 include/libLLVM/llvm/Transforms/Utils/IntegerDivision.h
@@ -1567,14 +1606,19 @@ include/libLLVM/llvm/Transforms/Utils/LowerMemIntrinsics.h
 include/libLLVM/llvm/Transforms/Utils/LowerSwitch.h
 include/libLLVM/llvm/Transforms/Utils/MatrixUtils.h
 include/libLLVM/llvm/Transforms/Utils/Mem2Reg.h
+include/libLLVM/llvm/Transforms/Utils/MemoryOpRemark.h
 include/libLLVM/llvm/Transforms/Utils/MetaRenamer.h
 include/libLLVM/llvm/Transforms/Utils/ModuleUtils.h
 include/libLLVM/llvm/Transforms/Utils/NameAnonGlobals.h
 include/libLLVM/llvm/Transforms/Utils/PredicateInfo.h
 include/libLLVM/llvm/Transforms/Utils/PromoteMemToReg.h
+include/libLLVM/llvm/Transforms/Utils/RelLookupTableConverter.h
+include/libLLVM/llvm/Transforms/Utils/SCCPSolver.h
 include/libLLVM/llvm/Transforms/Utils/SSAUpdater.h
 include/libLLVM/llvm/Transforms/Utils/SSAUpdaterBulk.h
 include/libLLVM/llvm/Transforms/Utils/SSAUpdaterImpl.h
+include/libLLVM/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
+include/libLLVM/llvm/Transforms/Utils/SampleProfileLoaderBaseUtil.h
 include/libLLVM/llvm/Transforms/Utils/SanitizerStats.h
 include/libLLVM/llvm/Transforms/Utils/ScalarEvolutionExpander.h
 include/libLLVM/llvm/Transforms/Utils/SimplifyCFGOptions.h
@@ -1587,7 +1631,6 @@ include/libLLVM/llvm/Transforms/Utils/StripNonLineTableDebugInfo.h
 include/libLLVM/llvm/Transforms/Utils/SymbolRewriter.h
 include/libLLVM/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
 include/libLLVM/llvm/Transforms/Utils/UnifyLoopExits.h
-include/libLLVM/llvm/Transforms/Utils/UniqueInternalLinkageNames.h
 include/libLLVM/llvm/Transforms/Utils/UnrollLoop.h
 include/libLLVM/llvm/Transforms/Utils/VNCoercion.h
 include/libLLVM/llvm/Transforms/Utils/ValueMapper.h
@@ -1618,10 +1661,10 @@ include/libLLVM/llvm/XRay/RecordPrinter.h
 include/libLLVM/llvm/XRay/Trace.h
 include/libLLVM/llvm/XRay/XRayRecord.h
 include/libLLVM/llvm/XRay/YAMLXRayRecord.h
+lib/libLLVM/cmake/llvm/LLVMConfigExtensions.cmake
 ${PLIST.notdylib}lib/libLLVM/libLLVM-${LLVM_MAJOR_MINOR}.${SOEXT}
 ${PLIST.notdylib}lib/libLLVM/libLLVM-${PKGVERSION}.${SOEXT}
 lib/libLLVM/libLLVM.${SOEXT}
-lib/libLLVM/cmake/llvm/LLVMConfigExtensions.cmake
 libexec/libLLVM/llvm-config
 share/libLLVM/cmake/AddLLVM.cmake
 share/libLLVM/cmake/AddLLVMDefinitions.cmake
@@ -1629,7 +1672,6 @@ share/libLLVM/cmake/AddOCaml.cmake
 share/libLLVM/cmake/AddSphinxTarget.cmake
 share/libLLVM/cmake/CheckAtomic.cmake
 share/libLLVM/cmake/CheckCompilerVersion.cmake
-share/libLLVM/cmake/CheckLinkerFlag.cmake
 share/libLLVM/cmake/ChooseMSVCCRT.cmake
 share/libLLVM/cmake/CrossCompile.cmake
 share/libLLVM/cmake/DetermineGCCCompatible.cmake
@@ -1639,11 +1681,13 @@ share/libLLVM/cmake/FindOCaml.cmake
 share/libLLVM/cmake/FindSphinx.cmake
 share/libLLVM/cmake/FindZ3.cmake
 share/libLLVM/cmake/GenerateVersionFromVCS.cmake
+share/libLLVM/cmake/GetErrcMessages.cmake
 share/libLLVM/cmake/GetLibraryName.cmake
 share/libLLVM/cmake/HandleLLVMOptions.cmake
 share/libLLVM/cmake/HandleLLVMStdlib.cmake
 share/libLLVM/cmake/LLVM-Build.cmake
 share/libLLVM/cmake/LLVM-Config.cmake
+share/libLLVM/cmake/LLVMCheckLinkerFlag.cmake
 share/libLLVM/cmake/LLVMConfig.cmake
 share/libLLVM/cmake/LLVMConfigVersion.cmake
 share/libLLVM/cmake/LLVMDistributionSupport.cmake
diff --git a/libLLVM/buildlink3.mk b/libLLVM/buildlink3.mk
index 968e42ff0e..09388a6a49 100644
--- a/libLLVM/buildlink3.mk
+++ b/libLLVM/buildlink3.mk
@@ -5,7 +5,7 @@ BUILDLINK_TREE+=	libLLVM
 .if !defined(LIBLLVM_BUILDLINK3_MK)
 LIBLLVM_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.libLLVM+=	libLLVM>=12
+BUILDLINK_API_DEPENDS.libLLVM+=	libLLVM>=13
 BUILDLINK_PKGSRCDIR.libLLVM?=	../../wip/libLLVM
 BUILDLINK_INCDIRS.libLLVM?=	include/libLLVM
 BUILDLINK_LIBDIRS.libLLVM?=	lib/libLLVM
diff --git a/libLLVM/distinfo b/libLLVM/distinfo
index 208699ec2f..52947df25d 100644
--- a/libLLVM/distinfo
+++ b/libLLVM/distinfo
@@ -1,14 +1,14 @@
 $NetBSD: distinfo,v 1.16 2020/03/06 22:44:18 tnn Exp $
 
-RMD160 (llvm-12.0.1.src.tar.xz) = 678910782ceac9bcd7234fca9d6e358ffbe7a660
-SHA512 (llvm-12.0.1.src.tar.xz) = ff674afb4c8eea699a4756f1bb463f15098a7fa354c733de83c024f8f0cf238cd5f19ae3ec446831c7109235e293e2bf31d8562567ede163c8ec53af7306ba0f
-Size (llvm-12.0.1.src.tar.xz) = 42898504 bytes
+BLAKE2s (llvm-13.0.0.src.tar.xz) = ffdfed33e870715f2e8c0efdc2c29566a2bffe5a6efce90ea7ca4990c9067f0f
+SHA512 (llvm-13.0.0.src.tar.xz) = c307500a5fdc2bf6d768a808cf879d33914e24437f4f794361eccedb28ac6a98ebc41ca6140d09364c9bdec565fabd049e364d3f5b39f1751ecff51b687c4eff
+Size (llvm-13.0.0.src.tar.xz) = 45471992 bytes
 SHA1 (patch-CMakeLists.txt) = c60afc86b44ae6c37840b3fea3533136aae2616d
 SHA1 (patch-cmake_config-ix.cmake) = 3b8b5295872ac1a5d90a8b4c78540d8ce1224bf0
-SHA1 (patch-cmake_modules_AddLLVM.cmake) = 352aa1c2cc5b832b47569239de9f0f661eb88e50
-SHA1 (patch-cmake_modules_CMakeLists.txt) = 69514dafb36794eb6923a39ef219bdc7b09c37ee
+SHA1 (patch-cmake_modules_AddLLVM.cmake) = 41000d0660af1bfe6ccd15d0e0611b7cbbd456a4
+SHA1 (patch-cmake_modules_CMakeLists.txt) = 57462a55dfd2af82df51f62fc222a081cdb3e0db
 SHA1 (patch-cmake_modules_CheckAtomic.cmake) = cb2eda89ca2413728fc594ff01fa7a287b2a22b9
 SHA1 (patch-include_llvm-c_DataTypes.h) = 790c9458d6590a0d6985fdcbd8785da340b9779b
 SHA1 (patch-include_llvm_Analysis_ConstantFolding.h) = 56b9374da236c346565897977040255b9766cab8
 SHA1 (patch-tools_llvm-config_llvm-config.cpp) = 12b0f7dd0d8caf635ca139abdde3ba49dc753cbe
-SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 5892d83e4b8f1c30eefb9b8560fed43cb1a226e9
+SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 97b9c7c3487989c2909dd0294a67a5328d9ef309
diff --git a/libLLVM/patches/patch-cmake_modules_AddLLVM.cmake b/libLLVM/patches/patch-cmake_modules_AddLLVM.cmake
index 0997f3c769..c1a24da34e 100644
--- a/libLLVM/patches/patch-cmake_modules_AddLLVM.cmake
+++ b/libLLVM/patches/patch-cmake_modules_AddLLVM.cmake
@@ -5,41 +5,32 @@ Make sure llvm-config goes in libexec/libLLVM to avoid conflict.
 Don't use non-portable -z discard-unused on SunOS.
 Don't use relative @rpath in llvm-config on Darwin.
 
---- cmake/modules/AddLLVM.cmake.orig	2021-06-28 16:23:38.000000000 +0000
+--- cmake/modules/AddLLVM.cmake.orig	2021-09-24 16:18:10.000000000 +0000
 +++ cmake/modules/AddLLVM.cmake
-@@ -594,12 +594,12 @@ function(llvm_add_library name)
-       set(library_name ${output_name}-${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX})
+@@ -616,10 +616,6 @@ function(llvm_add_library name)
        set(api_name ${output_name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
        set_target_properties(${name} PROPERTIES OUTPUT_NAME ${library_name})
--      llvm_install_library_symlink(${api_name} ${library_name} SHARED
--        COMPONENT ${name}
--        ALWAYS_GENERATE)
--      llvm_install_library_symlink(${output_name} ${library_name} SHARED
--        COMPONENT ${name}
--        ALWAYS_GENERATE)
-+#      llvm_install_library_symlink(${api_name} ${library_name} SHARED
-+#        COMPONENT ${name}
-+#        ALWAYS_GENERATE)
-+#      llvm_install_library_symlink(${output_name} ${library_name} SHARED
-+#        COMPONENT ${name}
-+#        ALWAYS_GENERATE)
+       if(UNIX)
+-        llvm_install_library_symlink(${api_name} ${library_name} SHARED
+-          COMPONENT ${name})
+-        llvm_install_library_symlink(${output_name} ${library_name} SHARED
+-          COMPONENT ${name})
+       endif()
      endif()
    endif()
- 
-@@ -802,12 +802,6 @@ macro(add_llvm_library name)
-         set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
+@@ -820,11 +816,6 @@ macro(add_llvm_library name)
        endif()
  
+       get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
 -      install(TARGETS ${name}
 -              ${export_to_llvmexports}
 -              LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
 -              ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
 -              RUNTIME DESTINATION bin COMPONENT ${name})
--
+ 
        if (NOT LLVM_ENABLE_IDE)
          add_llvm_install_targets(install-${name}
-                                  DEPENDS ${name}
-@@ -1015,7 +1009,7 @@ function(process_llvm_pass_plugins)
+@@ -1033,7 +1024,7 @@ function(process_llvm_pass_plugins)
  
        ## Part 1: Extension header to be included whenever we need extension
        #  processing.
@@ -48,8 +39,8 @@ Don't use relative @rpath in llvm-config on Darwin.
        set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
        file(WRITE
            "${llvm_cmake_builddir}/LLVMConfigExtensions.cmake"
-@@ -1219,7 +1213,7 @@ macro(add_llvm_tool name)
- 
+@@ -1234,7 +1225,7 @@ macro(add_llvm_tool name)
+       get_target_export_arg(${name} LLVM export_to_llvmexports)
        install(TARGETS ${name}
                ${export_to_llvmexports}
 -              RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
@@ -57,12 +48,12 @@ Don't use relative @rpath in llvm-config on Darwin.
                COMPONENT ${name})
  
        if (NOT LLVM_ENABLE_IDE)
-@@ -2099,7 +2093,7 @@ function(llvm_setup_rpath name)
+@@ -2118,7 +2109,7 @@ function(llvm_setup_rpath name)
    endif()
  
    if (APPLE)
 -    set(_install_name_dir INSTALL_NAME_DIR "@rpath")
 +    set(_install_name_dir INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib/libLLVM")
      set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
-   elseif(UNIX)
-     set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+   elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
+     # $ORIGIN is not interpreted at link time by aix ld.
diff --git a/libLLVM/patches/patch-cmake_modules_CMakeLists.txt b/libLLVM/patches/patch-cmake_modules_CMakeLists.txt
index e3dc3d02ca..a434eaf46d 100644
--- a/libLLVM/patches/patch-cmake_modules_CMakeLists.txt
+++ b/libLLVM/patches/patch-cmake_modules_CMakeLists.txt
@@ -2,9 +2,11 @@ $NetBSD: patch-cmake_modules_CMakeLists.txt,v 1.3 2017/03/17 22:38:18 adam Exp $
 
 Make sure cmake rules go in own directory to avoid conflicts.
 
---- cmake/modules/CMakeLists.txt.orig	2016-11-08 05:02:18.000000000 +0000
+--- cmake/modules/CMakeLists.txt.orig	2021-09-24 16:18:10.000000000 +0000
 +++ cmake/modules/CMakeLists.txt
-@@ -1,4 +1,4 @@
+@@ -1,6 +1,6 @@
+ include(LLVMDistributionSupport)
+ 
 -set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
 +set(LLVM_INSTALL_PACKAGE_DIR share/libLLVM/cmake)
  set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
diff --git a/libLLVM/patches/patch-tools_llvm-shlib_CMakeLists.txt b/libLLVM/patches/patch-tools_llvm-shlib_CMakeLists.txt
index e3eae960d1..d881ebd51a 100644
--- a/libLLVM/patches/patch-tools_llvm-shlib_CMakeLists.txt
+++ b/libLLVM/patches/patch-tools_llvm-shlib_CMakeLists.txt
@@ -1,10 +1,10 @@
-$NetBSD: patch-tools_llvm-shlib_CMakeLists.txt,v 1.7 2020/03/06 22:44:18 tnn Exp $
+$NetBSD: patch-tools_llvm-shlib_CMakeLists.txt,v 1.7 2021/11/23 20:55:44 wiz Exp $
 
 Use the Linux style linking everywhere except Darwin and SunOS.
 
---- tools/llvm-shlib/CMakeLists.txt.orig	2019-12-11 19:15:30.000000000 +0000
+--- tools/llvm-shlib/CMakeLists.txt.orig	2021-09-24 16:18:10.000000000 +0000
 +++ tools/llvm-shlib/CMakeLists.txt
-@@ -45,13 +45,11 @@ if(LLVM_BUILD_LLVM_DYLIB)
+@@ -33,13 +33,11 @@ if(LLVM_BUILD_LLVM_DYLIB)
    add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES})
  
    list(REMOVE_DUPLICATES LIB_NAMES)
@@ -15,17 +15,17 @@ Use the Linux style linking everywhere except Darwin and SunOS.
 -     OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
 -     OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
 -     OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME: It should be "GNU ld for elf"
-+  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
-+    set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
-+  elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
++  if("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
 +    set(LIB_NAMES -Wl,-Bsymbolic -Wl,-z -Wl,allextract ${LIB_NAMES} -Wl,-z -Wl,defaultextract)
++  elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
++    set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
 +  else()
      configure_file(
      ${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in
      ${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map)
-@@ -62,8 +60,6 @@ if(LLVM_BUILD_LLVM_DYLIB)
-       # Solaris ld does not accept global: *; so there is no way to version *all* global symbols
-       set(LIB_NAMES -Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map ${LIB_NAMES})
+@@ -57,8 +55,6 @@ if(LLVM_BUILD_LLVM_DYLIB)
+       # inside and outside libLLVM.so.
+       target_link_options(LLVM PRIVATE LINKER:-Bsymbolic-functions)
      endif()
 -  elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
 -    set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})


Home | Main Index | Thread Index | Old Index