aboutsummaryrefslogtreecommitdiff
path: root/lib/clang/libllvm/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/clang/libllvm/Makefile')
-rw-r--r--lib/clang/libllvm/Makefile153
1 files changed, 85 insertions, 68 deletions
diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile
index 98434d040baa..cb16d39961ae 100644
--- a/lib/clang/libllvm/Makefile
+++ b/lib/clang/libllvm/Makefile
@@ -2,8 +2,22 @@
.include <bsd.init.mk>
.include "../llvm.pre.mk"
+.if defined(TOOLS_PREFIX)
+# Build static library during cross-tools stage
LIB= llvm
INTERNALLIB=
+.else
+PACKAGE= clang
+SHLIB_CXX= llvm
+SHLIB_MAJOR= 19
+PRIVATELIB=
+.if ${MACHINE} == "powerpc"
+# Work around "relocation R_PPC_GOT16 out of range" errors
+PICFLAG= -fPIC
+.endif
+.endif
+
+SHARED_CXXFLAGS+= -UPIC # To avoid compile errors
CFLAGS+= -I${.OBJDIR}
CFLAGS+= -I${SRCTOP}/sys/contrib/zstd/lib
@@ -140,7 +154,6 @@ SRCS_MIN+= Analysis/RegionPass.cpp
SRCS_MIN+= Analysis/RegionPrinter.cpp
SRCS_MIN+= Analysis/ReplayInlineAdvisor.cpp
SRCS_MIN+= Analysis/ScalarEvolution.cpp
-SRCS_MIN+= Analysis/ScalarEvolution.cpp
SRCS_MIN+= Analysis/ScalarEvolutionAliasAnalysis.cpp
SRCS_MIN+= Analysis/ScalarEvolutionDivision.cpp
SRCS_MIN+= Analysis/ScalarEvolutionNormalization.cpp
@@ -510,24 +523,24 @@ SRCS_EXT+= DWP/DWP.cpp
SRCS_EXT+= DWP/DWPError.cpp
SRCS_MIW+= DebugInfo/BTF/BTFContext.cpp
SRCS_MIW+= DebugInfo/BTF/BTFParser.cpp
-SRCS_EXT+= DebugInfo/CodeView/AppendingTypeTableBuilder.cpp
+SRCS_MIN+= DebugInfo/CodeView/AppendingTypeTableBuilder.cpp
SRCS_MIN+= DebugInfo/CodeView/CVSymbolVisitor.cpp
SRCS_MIN+= DebugInfo/CodeView/CVTypeVisitor.cpp
SRCS_MIN+= DebugInfo/CodeView/CodeViewError.cpp
SRCS_MIN+= DebugInfo/CodeView/CodeViewRecordIO.cpp
SRCS_MIN+= DebugInfo/CodeView/ContinuationRecordBuilder.cpp
SRCS_MIN+= DebugInfo/CodeView/DebugChecksumsSubsection.cpp
-SRCS_EXT+= DebugInfo/CodeView/DebugCrossExSubsection.cpp
-SRCS_EXT+= DebugInfo/CodeView/DebugCrossImpSubsection.cpp
+SRCS_MIN+= DebugInfo/CodeView/DebugCrossExSubsection.cpp
+SRCS_MIN+= DebugInfo/CodeView/DebugCrossImpSubsection.cpp
SRCS_MIN+= DebugInfo/CodeView/DebugFrameDataSubsection.cpp
SRCS_MIN+= DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp
SRCS_MIN+= DebugInfo/CodeView/DebugLinesSubsection.cpp
SRCS_MIN+= DebugInfo/CodeView/DebugStringTableSubsection.cpp
-SRCS_MIW+= DebugInfo/CodeView/DebugSubsection.cpp
-SRCS_EXT+= DebugInfo/CodeView/DebugSubsectionRecord.cpp
-SRCS_EXT+= DebugInfo/CodeView/DebugSubsectionVisitor.cpp
-SRCS_EXT+= DebugInfo/CodeView/DebugSymbolRVASubsection.cpp
-SRCS_EXT+= DebugInfo/CodeView/DebugSymbolsSubsection.cpp
+SRCS_MIN+= DebugInfo/CodeView/DebugSubsection.cpp
+SRCS_MIN+= DebugInfo/CodeView/DebugSubsectionRecord.cpp
+SRCS_MIN+= DebugInfo/CodeView/DebugSubsectionVisitor.cpp
+SRCS_MIN+= DebugInfo/CodeView/DebugSymbolRVASubsection.cpp
+SRCS_MIN+= DebugInfo/CodeView/DebugSymbolsSubsection.cpp
SRCS_MIN+= DebugInfo/CodeView/EnumTables.cpp
SRCS_MIN+= DebugInfo/CodeView/Formatters.cpp
SRCS_MIN+= DebugInfo/CodeView/GlobalTypeTableBuilder.cpp
@@ -541,7 +554,7 @@ SRCS_EXT+= DebugInfo/CodeView/StringsAndChecksums.cpp
SRCS_MIN+= DebugInfo/CodeView/SymbolDumper.cpp
SRCS_MIN+= DebugInfo/CodeView/SymbolRecordHelpers.cpp
SRCS_MIN+= DebugInfo/CodeView/SymbolRecordMapping.cpp
-SRCS_EXT+= DebugInfo/CodeView/SymbolSerializer.cpp
+SRCS_MIN+= DebugInfo/CodeView/SymbolSerializer.cpp
SRCS_MIN+= DebugInfo/CodeView/TypeDumpVisitor.cpp
SRCS_MIN+= DebugInfo/CodeView/TypeHashing.cpp
SRCS_MIN+= DebugInfo/CodeView/TypeIndex.cpp
@@ -550,37 +563,37 @@ SRCS_EXT+= DebugInfo/CodeView/TypeRecordHelpers.cpp
SRCS_MIN+= DebugInfo/CodeView/TypeRecordMapping.cpp
SRCS_MIN+= DebugInfo/CodeView/TypeStreamMerger.cpp
SRCS_MIN+= DebugInfo/CodeView/TypeTableCollection.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFAddressRange.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFCompileUnit.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFContext.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDataExtractor.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugAddr.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugArangeSet.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugAranges.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugFrame.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugLine.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugLoc.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugMacro.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugPubTable.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugRangeList.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDebugRnglists.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFDie.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFAddressRange.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFCompileUnit.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFContext.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDataExtractor.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugAddr.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugArangeSet.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugAranges.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugFrame.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugLine.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugLoc.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugMacro.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugPubTable.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugRangeList.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDebugRnglists.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFDie.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFExpression.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFFormValue.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFGdbIndex.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFListTable.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFTypePrinter.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFTypeUnit.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFUnit.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFUnitIndex.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFVerifier.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFFormValue.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFGdbIndex.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFListTable.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFTypePrinter.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFTypeUnit.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFUnit.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFUnitIndex.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFVerifier.cpp
SRCS_MIN+= DebugInfo/MSF/MSFBuilder.cpp
SRCS_MIN+= DebugInfo/MSF/MSFCommon.cpp
-SRCS_EXT+= DebugInfo/MSF/MSFError.cpp
+SRCS_MIN+= DebugInfo/MSF/MSFError.cpp
SRCS_MIN+= DebugInfo/MSF/MappedBlockStream.cpp
SRCS_EXT+= DebugInfo/PDB/GenericError.cpp
SRCS_EXT+= DebugInfo/PDB/IPDBSourceFile.cpp
@@ -868,7 +881,7 @@ SRCS_MIN+= LTO/LTO.cpp
SRCS_MIN+= LTO/LTOBackend.cpp
SRCS_EXL+= LTO/LTOCodeGenerator.cpp
SRCS_EXL+= LTO/LTOModule.cpp
-SRCS_EXL+= LTO/SummaryBasedOptimizations.cpp
+SRCS_MIN+= LTO/SummaryBasedOptimizations.cpp
SRCS_EXL+= LTO/ThinLTOCodeGenerator.cpp
SRCS_MIN+= LTO/UpdateCompilerUsed.cpp
SRCS_MIN+= Linker/IRMover.cpp
@@ -893,7 +906,7 @@ SRCS_MIN+= MC/MCContext.cpp
SRCS_MIN+= MC/MCDXContainerStreamer.cpp
SRCS_MIN+= MC/MCDXContainerWriter.cpp
SRCS_XDL+= MC/MCDisassembler/Disassembler.cpp
-SRCS_XDW+= MC/MCDisassembler/MCDisassembler.cpp
+SRCS_MIN+= MC/MCDisassembler/MCDisassembler.cpp
SRCS_XDW+= MC/MCDisassembler/MCExternalSymbolizer.cpp
SRCS_MIN+= MC/MCDisassembler/MCRelocationInfo.cpp
SRCS_XDW+= MC/MCDisassembler/MCSymbolizer.cpp
@@ -1007,9 +1020,9 @@ SRCS_MIW+= ObjCopy/wasm/WasmWriter.cpp
SRCS_MIN+= Object/Archive.cpp
SRCS_MIN+= Object/ArchiveWriter.cpp
SRCS_MIN+= Object/Binary.cpp
-SRCS_MIW+= Object/BuildID.cpp
+SRCS_MIN+= Object/BuildID.cpp
SRCS_MIN+= Object/COFFImportFile.cpp
-SRCS_MIW+= Object/COFFModuleDefinition.cpp
+SRCS_MIN+= Object/COFFModuleDefinition.cpp
SRCS_MIN+= Object/COFFObjectFile.cpp
SRCS_MIN+= Object/Decompressor.cpp
SRCS_MIN+= Object/ELF.cpp
@@ -1019,31 +1032,34 @@ SRCS_MIW+= Object/FaultMapParser.cpp
SRCS_MIN+= Object/IRObjectFile.cpp
SRCS_MIN+= Object/IRSymtab.cpp
SRCS_MIN+= Object/MachOObjectFile.cpp
-SRCS_MIW+= Object/MachOUniversal.cpp
+SRCS_MIN+= Object/MachOUniversal.cpp
SRCS_MIW+= Object/MachOUniversalWriter.cpp
-SRCS_MIW+= Object/Minidump.cpp
+SRCS_MIN+= Object/Minidump.cpp
SRCS_MIN+= Object/ModuleSymbolTable.cpp
SRCS_EXT+= Object/Object.cpp
SRCS_MIN+= Object/ObjectFile.cpp
-SRCS_MIW+= Object/OffloadBinary.cpp
+SRCS_MIN+= Object/OffloadBinary.cpp
SRCS_MIN+= Object/RecordStreamer.cpp
-SRCS_MIW+= Object/RelocationResolver.cpp
+SRCS_MIN+= Object/RelocationResolver.cpp
SRCS_MIW+= Object/SymbolSize.cpp
SRCS_MIN+= Object/SymbolicFile.cpp
-SRCS_MIW+= Object/TapiFile.cpp
-SRCS_MIW+= Object/TapiUniversal.cpp
+SRCS_MIN+= Object/TapiFile.cpp
+SRCS_MIN+= Object/TapiUniversal.cpp
SRCS_MIN+= Object/WasmObjectFile.cpp
SRCS_MIW+= Object/WindowsMachineFlag.cpp
SRCS_MIN+= Object/WindowsResource.cpp
SRCS_MIN+= Object/XCOFFObjectFile.cpp
SRCS_MIN+= ObjectYAML/COFFYAML.cpp
-SRCS_EXT+= ObjectYAML/CodeViewYAMLDebugSections.cpp
-SRCS_EXT+= ObjectYAML/CodeViewYAMLSymbols.cpp
-SRCS_EXT+= ObjectYAML/CodeViewYAMLTypes.cpp
+SRCS_MIN+= ObjectYAML/CodeViewYAMLDebugSections.cpp
+SRCS_MIN+= ObjectYAML/CodeViewYAMLSymbols.cpp
+SRCS_MIN+= ObjectYAML/CodeViewYAMLTypeHashing.cpp
+SRCS_MIN+= ObjectYAML/CodeViewYAMLTypes.cpp
+SRCS_MIN+= ObjectYAML/DWARFEmitter.cpp
SRCS_MIN+= ObjectYAML/DWARFYAML.cpp
+SRCS_MIN+= ObjectYAML/ELFEmitter.cpp
SRCS_MIN+= ObjectYAML/ELFYAML.cpp
SRCS_MIN+= ObjectYAML/MachOYAML.cpp
-SRCS_EXT+= ObjectYAML/YAML.cpp
+SRCS_MIN+= ObjectYAML/YAML.cpp
SRCS_MIN+= Option/Arg.cpp
SRCS_MIN+= Option/ArgList.cpp
SRCS_MIN+= Option/OptTable.cpp
@@ -1136,7 +1152,7 @@ SRCS_MIN+= Support/ErrorHandling.cpp
SRCS_MIN+= Support/ExponentialBackoff.cpp
SRCS_MIN+= Support/ExtensibleRTTI.cpp
SRCS_MIN+= Support/FileCollector.cpp
-SRCS_MIW+= Support/FileOutputBuffer.cpp
+SRCS_MIN+= Support/FileOutputBuffer.cpp
SRCS_MIN+= Support/FileUtilities.cpp
SRCS_MIN+= Support/FloatingPointMode.cpp
SRCS_MIN+= Support/FoldingSet.cpp
@@ -1162,7 +1178,7 @@ SRCS_MIW+= Support/MSP430Attributes.cpp
SRCS_MIN+= Support/ManagedStatic.cpp
SRCS_MIN+= Support/MathExtras.cpp
SRCS_MIN+= Support/MemAlloc.cpp
-SRCS_MIW+= Support/Memory.cpp
+SRCS_MIN+= Support/Memory.cpp
SRCS_MIN+= Support/MemoryBuffer.cpp
SRCS_MIN+= Support/MemoryBufferRef.cpp
SRCS_MIN+= Support/NativeFormatting.cpp
@@ -1201,7 +1217,7 @@ SRCS_MIN+= Support/SuffixTree.cpp
SRCS_MIN+= Support/SuffixTreeNode.cpp
SRCS_EXT+= Support/SystemUtils.cpp
SRCS_LLD+= Support/TarWriter.cpp
-SRCS_MIW+= Support/ThreadPool.cpp
+SRCS_MIN+= Support/ThreadPool.cpp
SRCS_MIN+= Support/Threading.cpp
SRCS_MIN+= Support/TimeProfiler.cpp
SRCS_MIN+= Support/Timer.cpp
@@ -1696,21 +1712,22 @@ SRCS_MIN+= TargetParser/SubtargetFeature.cpp
SRCS_MIN+= TargetParser/TargetParser.cpp
SRCS_MIN+= TargetParser/Triple.cpp
SRCS_MIN+= TargetParser/X86TargetParser.cpp
-SRCS_MIW+= TextAPI/Architecture.cpp
-SRCS_MIW+= TextAPI/ArchitectureSet.cpp
+SRCS_MIN+= TextAPI/Architecture.cpp
+SRCS_MIN+= TextAPI/ArchitectureSet.cpp
SRCS_MIW+= TextAPI/BinaryReader/DylibReader.cpp
-SRCS_MIW+= TextAPI/InterfaceFile.cpp
-SRCS_MIW+= TextAPI/PackedVersion.cpp
-SRCS_MIW+= TextAPI/Platform.cpp
+SRCS_MIN+= TextAPI/InterfaceFile.cpp
+SRCS_MIN+= TextAPI/PackedVersion.cpp
+SRCS_MIN+= TextAPI/Platform.cpp
SRCS_MIW+= TextAPI/RecordVisitor.cpp
-SRCS_MIW+= TextAPI/Symbol.cpp
-SRCS_MIW+= TextAPI/SymbolSet.cpp
-SRCS_MIW+= TextAPI/Target.cpp
-SRCS_MIW+= TextAPI/TextAPIError.cpp
-SRCS_MIW+= TextAPI/TextStub.cpp
-SRCS_MIW+= TextAPI/TextStubCommon.cpp
-SRCS_MIW+= TextAPI/TextStubV5.cpp
-SRCS_MIW+= TextAPI/Utils.cpp
+SRCS_MIW+= TextAPI/RecordsSlice.cpp
+SRCS_MIN+= TextAPI/Symbol.cpp
+SRCS_MIN+= TextAPI/SymbolSet.cpp
+SRCS_MIN+= TextAPI/Target.cpp
+SRCS_MIN+= TextAPI/TextAPIError.cpp
+SRCS_MIN+= TextAPI/TextStub.cpp
+SRCS_MIN+= TextAPI/TextStubCommon.cpp
+SRCS_MIN+= TextAPI/TextStubV5.cpp
+SRCS_MIN+= TextAPI/Utils.cpp
SRCS_MIN+= ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
SRCS_MIW+= ToolDrivers/llvm-lib/LibDriver.cpp
SRCS_MIN+= Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp