pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
llvm*: optionalize backend targets
Module Name: pkgsrc-wip
Committed By: Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By: tnn
Date: Sun Feb 21 14:23:03 2016 +0100
Changeset: 2ab3d8a4b4f4bd9cadc52124098d5610a87bb414
Modified Files:
llvm-git/Makefile
llvm-git/PLIST
llvm/Makefile
llvm/PLIST
Added Files:
llvm-git/options.mk
llvm/options.mk
Log Message:
llvm*: optionalize backend targets
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2ab3d8a4b4f4bd9cadc52124098d5610a87bb414
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
llvm-git/Makefile | 5 ++--
llvm-git/PLIST | 84 ++++++++++++++++++++++++++++++++++++++++++++++++-----
llvm-git/options.mk | 38 ++++++++++++++++++++++++
llvm/Makefile | 5 ++--
llvm/PLIST | 83 +++++++++++++++++++++++++++++++++++++++++++++++-----
llvm/options.mk | 38 ++++++++++++++++++++++++
6 files changed, 233 insertions(+), 20 deletions(-)
diffs:
diff --git a/llvm-git/Makefile b/llvm-git/Makefile
index 7e02292..997e41a 100644
--- a/llvm-git/Makefile
+++ b/llvm-git/Makefile
@@ -23,8 +23,6 @@ CMAKE_ARG_PATH= ${WRKSRC}
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
CMAKE_ARGS+= -DCMAKE_C_COMPILER=gcc
CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=g++
-# Try to optimize building LLVM for now.
-CMAKE_ARGS+= -DLLVM_TARGETS_TO_BUILD="X86"
CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm
@@ -70,6 +68,9 @@ REPLACE_PYTHON+= utils/wciia.py
TEST_TARGET= check
TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/lib
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
post-extract:
${RUN} mkdir -p ${WRKDIR}/build
diff --git a/llvm-git/PLIST b/llvm-git/PLIST
index 19e4ebc..4e1cab7 100644
--- a/llvm-git/PLIST
+++ b/llvm-git/PLIST
@@ -699,7 +699,7 @@ include/llvm/Support/ELFRelocs/Sparc.def
include/llvm/Support/ELFRelocs/SystemZ.def
include/llvm/Support/ELFRelocs/WebAssembly.def
include/llvm/Support/ELFRelocs/i386.def
-include/llvm/Support/ELFRelocs/${MACHINE_ARCH}.def
+include/llvm/Support/ELFRelocs/x86_64.def
include/llvm/Support/Endian.h
include/llvm/Support/EndianStream.h
include/llvm/Support/Errc.h
@@ -883,18 +883,49 @@ lib/cmake/llvm/LLVMInstallSymlink.cmake
lib/cmake/llvm/LLVMProcessSources.cmake
lib/cmake/llvm/TableGen.cmake
lib/cmake/llvm/VersionFromVCS.cmake
+${PLIST.AArch64}lib/libLLVMAArch64AsmParser.a
+${PLIST.AArch64}lib/libLLVMAArch64AsmPrinter.a
+${PLIST.AArch64}lib/libLLVMAArch64CodeGen.a
+${PLIST.AArch64}lib/libLLVMAArch64Desc.a
+${PLIST.AArch64}lib/libLLVMAArch64Disassembler.a
+${PLIST.AArch64}lib/libLLVMAArch64Info.a
+${PLIST.AArch64}lib/libLLVMAArch64Utils.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUAsmParser.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUAsmPrinter.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUCodeGen.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUDesc.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUDisassembler.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUInfo.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUUtils.a
+${PLIST.ARM}lib/libLLVMARMAsmParser.a
+${PLIST.ARM}lib/libLLVMARMAsmPrinter.a
+${PLIST.ARM}lib/libLLVMARMCodeGen.a
+${PLIST.ARM}lib/libLLVMARMDesc.a
+${PLIST.ARM}lib/libLLVMARMDisassembler.a
+${PLIST.ARM}lib/libLLVMARMInfo.a
lib/libLLVMAnalysis.a
lib/libLLVMAsmParser.a
lib/libLLVMAsmPrinter.a
lib/libLLVMBitReader.a
+${PLIST.BPF}lib/libLLVMBPFAsmPrinter.a
+${PLIST.BPF}lib/libLLVMBPFCodeGen.a
+${PLIST.BPF}lib/libLLVMBPFDesc.a
+${PLIST.BPF}lib/libLLVMBPFInfo.a
lib/libLLVMBitWriter.a
lib/libLLVMCodeGen.a
lib/libLLVMCore.a
+${PLIST.CppBackend}lib/libLLVMCppBackendCodeGen.a
+${PLIST.CppBackend}lib/libLLVMCppBackendInfo.a
lib/libLLVMDebugInfoCodeView.a
lib/libLLVMDebugInfoDWARF.a
lib/libLLVMDebugInfoPDB.a
lib/libLLVMExecutionEngine.a
lib/libLLVMGlobalISel.a
+${PLIST.Hexagon}lib/libLLVMHexagonAsmParser.a
+${PLIST.Hexagon}lib/libLLVMHexagonCodeGen.a
+${PLIST.Hexagon}lib/libLLVMHexagonDesc.a
+${PLIST.Hexagon}lib/libLLVMHexagonDisassembler.a
+${PLIST.Hexagon}lib/libLLVMHexagonInfo.a
lib/libLLVMIRReader.a
lib/libLLVMInstCombine.a
lib/libLLVMInstrumentation.a
@@ -908,27 +939,64 @@ lib/libLLVMMCDisassembler.a
lib/libLLVMMCJIT.a
lib/libLLVMMCParser.a
lib/libLLVMMIRParser.a
+${PLIST.MSP430}lib/libLLVMMSP430AsmPrinter.a
+${PLIST.MSP430}lib/libLLVMMSP430CodeGen.a
+${PLIST.MSP430}lib/libLLVMMSP430Desc.a
+${PLIST.MSP430}lib/libLLVMMSP430Info.a
+${PLIST.Mips}lib/libLLVMMipsAsmParser.a
+${PLIST.Mips}lib/libLLVMMipsAsmPrinter.a
+${PLIST.Mips}lib/libLLVMMipsCodeGen.a
+${PLIST.Mips}lib/libLLVMMipsDesc.a
+${PLIST.Mips}lib/libLLVMMipsDisassembler.a
+${PLIST.Mips}lib/libLLVMMipsInfo.a
+${PLIST.NVPTX}lib/libLLVMNVPTXAsmPrinter.a
+${PLIST.NVPTX}lib/libLLVMNVPTXCodeGen.a
+${PLIST.NVPTX}lib/libLLVMNVPTXDesc.a
+${PLIST.NVPTX}lib/libLLVMNVPTXInfo.a
lib/libLLVMObjCARCOpts.a
lib/libLLVMObject.a
lib/libLLVMOption.a
lib/libLLVMOrcJIT.a
lib/libLLVMPasses.a
+${PLIST.PowerPC}lib/libLLVMPowerPCAsmParser.a
+${PLIST.PowerPC}lib/libLLVMPowerPCAsmPrinter.a
+${PLIST.PowerPC}lib/libLLVMPowerPCCodeGen.a
+${PLIST.PowerPC}lib/libLLVMPowerPCDesc.a
+${PLIST.PowerPC}lib/libLLVMPowerPCDisassembler.a
+${PLIST.PowerPC}lib/libLLVMPowerPCInfo.a
lib/libLLVMProfileData.a
lib/libLLVMRuntimeDyld.a
lib/libLLVMScalarOpts.a
lib/libLLVMSelectionDAG.a
+${PLIST.Sparc}lib/libLLVMSparcAsmParser.a
+${PLIST.Sparc}lib/libLLVMSparcAsmPrinter.a
+${PLIST.Sparc}lib/libLLVMSparcCodeGen.a
+${PLIST.Sparc}lib/libLLVMSparcDesc.a
+${PLIST.Sparc}lib/libLLVMSparcDisassembler.a
+${PLIST.Sparc}lib/libLLVMSparcInfo.a
lib/libLLVMSupport.a
lib/libLLVMSymbolize.a
+${PLIST.SystemZ}lib/libLLVMSystemZAsmParser.a
+${PLIST.SystemZ}lib/libLLVMSystemZAsmPrinter.a
+${PLIST.SystemZ}lib/libLLVMSystemZCodeGen.a
+${PLIST.SystemZ}lib/libLLVMSystemZDesc.a
+${PLIST.SystemZ}lib/libLLVMSystemZDisassembler.a
+${PLIST.SystemZ}lib/libLLVMSystemZInfo.a
lib/libLLVMTableGen.a
lib/libLLVMTarget.a
lib/libLLVMTransformUtils.a
lib/libLLVMVectorize.a
-lib/libLLVMX86AsmParser.a
-lib/libLLVMX86AsmPrinter.a
-lib/libLLVMX86CodeGen.a
-lib/libLLVMX86Desc.a
-lib/libLLVMX86Disassembler.a
-lib/libLLVMX86Info.a
-lib/libLLVMX86Utils.a
+${PLIST.X86}lib/libLLVMX86AsmParser.a
+${PLIST.X86}lib/libLLVMX86AsmPrinter.a
+${PLIST.X86}lib/libLLVMX86CodeGen.a
+${PLIST.X86}lib/libLLVMX86Desc.a
+${PLIST.X86}lib/libLLVMX86Disassembler.a
+${PLIST.X86}lib/libLLVMX86Info.a
+${PLIST.X86}lib/libLLVMX86Utils.a
+${PLIST.XCore}lib/libLLVMXCoreAsmPrinter.a
+${PLIST.XCore}lib/libLLVMXCoreCodeGen.a
+${PLIST.XCore}lib/libLLVMXCoreDesc.a
+${PLIST.XCore}lib/libLLVMXCoreDisassembler.a
+${PLIST.XCore}lib/libLLVMXCoreInfo.a
lib/libLLVMipo.a
lib/libLTO.so
diff --git a/llvm-git/options.mk b/llvm-git/options.mk
new file mode 100644
index 0000000..5dc7a4f
--- /dev/null
+++ b/llvm-git/options.mk
@@ -0,0 +1,38 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.llvm
+
+LLVM_TARGETS= AArch64 AMDGPU ARM BPF CppBackend Hexagon MSP430 Mips NVPTX PowerPC Sparc SystemZ X86 XCore
+
+.for tgt in ${LLVM_TARGETS}
+PLIST_VARS+= ${tgt}
+PKG_SUPPORTED_OPTIONS+= llvm-target-${tgt:tl}
+.endfor
+
+# Probably safe to assume that only x86 users are interested in
+# cross-compilation for now. This saves some build time for everyone else.
+.if !empty(MACHINE_ARCH:Msparc*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-sparc
+.elif !empty(MACHINE_ARCH:Mpowerpc*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-powerpc
+.elif !empty(MACHINE_ARCH:Mearm*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-arm
+.elif !empty(MACHINE_ARCH:M*mips*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-mips
+.else
+# X86 and everyone else get all targets by default.
+. for tgt in ${LLVM_TARGETS}
+PKG_SUGGESTED_OPTIONS+= llvm-target-${tgt:tl}
+. endfor
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.for tgt in ${LLVM_TARGETS}
+. if !empty(PKG_OPTIONS:Mllvm-target-${tgt:tl})
+PLIST.${tgt}= yes
+LLVM_TARGETS_TO_BUILD+= ${tgt}
+. endif
+.endfor
+
+CMAKE_ARGS+= -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS_TO_BUILD:ts;}"
diff --git a/llvm/Makefile b/llvm/Makefile
index e01bbdf..a0c9ac0 100644
--- a/llvm/Makefile
+++ b/llvm/Makefile
@@ -23,8 +23,6 @@ CMAKE_ARG_PATH= ${WRKSRC}
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
CMAKE_ARGS+= -DCMAKE_C_COMPILER=gcc
CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=g++
-# Try to optimize building LLVM for now.
-CMAKE_ARGS+= -DLLVM_TARGETS_TO_BUILD="X86"
CHECK_PORTABILITY_SKIP= utils/buildit/build_llvm
@@ -70,6 +68,9 @@ REPLACE_PYTHON+= utils/wciia.py
TEST_TARGET= check
TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/lib
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
post-extract:
${RUN} mkdir -p ${WRKDIR}/build
diff --git a/llvm/PLIST b/llvm/PLIST
index 823adb1..8471fd0 100644
--- a/llvm/PLIST
+++ b/llvm/PLIST
@@ -686,7 +686,7 @@ include/llvm/Support/ELFRelocs/Sparc.def
include/llvm/Support/ELFRelocs/SystemZ.def
include/llvm/Support/ELFRelocs/WebAssembly.def
include/llvm/Support/ELFRelocs/i386.def
-include/llvm/Support/ELFRelocs/${MACHINE_ARCH}.def
+include/llvm/Support/ELFRelocs/x86_64.def
include/llvm/Support/Endian.h
include/llvm/Support/EndianStream.h
include/llvm/Support/Errc.h
@@ -842,17 +842,47 @@ include/llvm/Transforms/Utils/ValueMapper.h
include/llvm/Transforms/Vectorize.h
lib/BugpointPasses.so
lib/LLVMHello.so
+${PLIST.AArch64}lib/libLLVMAArch64AsmParser.a
+${PLIST.AArch64}lib/libLLVMAArch64AsmPrinter.a
+${PLIST.AArch64}lib/libLLVMAArch64CodeGen.a
+${PLIST.AArch64}lib/libLLVMAArch64Desc.a
+${PLIST.AArch64}lib/libLLVMAArch64Disassembler.a
+${PLIST.AArch64}lib/libLLVMAArch64Info.a
+${PLIST.AArch64}lib/libLLVMAArch64Utils.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUAsmParser.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUAsmPrinter.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUCodeGen.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUDesc.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUInfo.a
+${PLIST.AMDGPU}lib/libLLVMAMDGPUUtils.a
+${PLIST.ARM}lib/libLLVMARMAsmParser.a
+${PLIST.ARM}lib/libLLVMARMAsmPrinter.a
+${PLIST.ARM}lib/libLLVMARMCodeGen.a
+${PLIST.ARM}lib/libLLVMARMDesc.a
+${PLIST.ARM}lib/libLLVMARMDisassembler.a
+${PLIST.ARM}lib/libLLVMARMInfo.a
lib/libLLVMAnalysis.a
lib/libLLVMAsmParser.a
lib/libLLVMAsmPrinter.a
+${PLIST.BPF}lib/libLLVMBPFAsmPrinter.a
+${PLIST.BPF}lib/libLLVMBPFCodeGen.a
+${PLIST.BPF}lib/libLLVMBPFDesc.a
+${PLIST.BPF}lib/libLLVMBPFInfo.a
lib/libLLVMBitReader.a
lib/libLLVMBitWriter.a
lib/libLLVMCodeGen.a
lib/libLLVMCore.a
+${PLIST.CppBackend}lib/libLLVMCppBackendCodeGen.a
+${PLIST.CppBackend}lib/libLLVMCppBackendInfo.a
lib/libLLVMDebugInfoCodeView.a
lib/libLLVMDebugInfoDWARF.a
lib/libLLVMDebugInfoPDB.a
lib/libLLVMExecutionEngine.a
+${PLIST.Hexagon}lib/libLLVMHexagonAsmParser.a
+${PLIST.Hexagon}lib/libLLVMHexagonCodeGen.a
+${PLIST.Hexagon}lib/libLLVMHexagonDesc.a
+${PLIST.Hexagon}lib/libLLVMHexagonDisassembler.a
+${PLIST.Hexagon}lib/libLLVMHexagonInfo.a
lib/libLLVMIRReader.a
lib/libLLVMInstCombine.a
lib/libLLVMInstrumentation.a
@@ -866,28 +896,65 @@ lib/libLLVMMCDisassembler.a
lib/libLLVMMCJIT.a
lib/libLLVMMCParser.a
lib/libLLVMMIRParser.a
+${PLIST.MSP430}lib/libLLVMMSP430AsmPrinter.a
+${PLIST.MSP430}lib/libLLVMMSP430CodeGen.a
+${PLIST.MSP430}lib/libLLVMMSP430Desc.a
+${PLIST.MSP430}lib/libLLVMMSP430Info.a
+${PLIST.Mips}lib/libLLVMMipsAsmParser.a
+${PLIST.Mips}lib/libLLVMMipsAsmPrinter.a
+${PLIST.Mips}lib/libLLVMMipsCodeGen.a
+${PLIST.Mips}lib/libLLVMMipsDesc.a
+${PLIST.Mips}lib/libLLVMMipsDisassembler.a
+${PLIST.Mips}lib/libLLVMMipsInfo.a
+${PLIST.NVPTX}lib/libLLVMNVPTXAsmPrinter.a
+${PLIST.NVPTX}lib/libLLVMNVPTXCodeGen.a
+${PLIST.NVPTX}lib/libLLVMNVPTXDesc.a
+${PLIST.NVPTX}lib/libLLVMNVPTXInfo.a
lib/libLLVMObjCARCOpts.a
lib/libLLVMObject.a
lib/libLLVMOption.a
lib/libLLVMOrcJIT.a
lib/libLLVMPasses.a
+${PLIST.PowerPC}lib/libLLVMPowerPCAsmParser.a
+${PLIST.PowerPC}lib/libLLVMPowerPCAsmPrinter.a
+${PLIST.PowerPC}lib/libLLVMPowerPCCodeGen.a
+${PLIST.PowerPC}lib/libLLVMPowerPCDesc.a
+${PLIST.PowerPC}lib/libLLVMPowerPCDisassembler.a
+${PLIST.PowerPC}lib/libLLVMPowerPCInfo.a
lib/libLLVMProfileData.a
lib/libLLVMRuntimeDyld.a
lib/libLLVMScalarOpts.a
lib/libLLVMSelectionDAG.a
+${PLIST.Sparc}lib/libLLVMSparcAsmParser.a
+${PLIST.Sparc}lib/libLLVMSparcAsmPrinter.a
+${PLIST.Sparc}lib/libLLVMSparcCodeGen.a
+${PLIST.Sparc}lib/libLLVMSparcDesc.a
+${PLIST.Sparc}lib/libLLVMSparcDisassembler.a
+${PLIST.Sparc}lib/libLLVMSparcInfo.a
lib/libLLVMSupport.a
lib/libLLVMSymbolize.a
+${PLIST.SystemZ}lib/libLLVMSystemZAsmParser.a
+${PLIST.SystemZ}lib/libLLVMSystemZAsmPrinter.a
+${PLIST.SystemZ}lib/libLLVMSystemZCodeGen.a
+${PLIST.SystemZ}lib/libLLVMSystemZDesc.a
+${PLIST.SystemZ}lib/libLLVMSystemZDisassembler.a
+${PLIST.SystemZ}lib/libLLVMSystemZInfo.a
lib/libLLVMTableGen.a
lib/libLLVMTarget.a
lib/libLLVMTransformUtils.a
lib/libLLVMVectorize.a
-lib/libLLVMX86AsmParser.a
-lib/libLLVMX86AsmPrinter.a
-lib/libLLVMX86CodeGen.a
-lib/libLLVMX86Desc.a
-lib/libLLVMX86Disassembler.a
-lib/libLLVMX86Info.a
-lib/libLLVMX86Utils.a
+${PLIST.X86}lib/libLLVMX86AsmParser.a
+${PLIST.X86}lib/libLLVMX86AsmPrinter.a
+${PLIST.X86}lib/libLLVMX86CodeGen.a
+${PLIST.X86}lib/libLLVMX86Desc.a
+${PLIST.X86}lib/libLLVMX86Disassembler.a
+${PLIST.X86}lib/libLLVMX86Info.a
+${PLIST.X86}lib/libLLVMX86Utils.a
+${PLIST.XCore}lib/libLLVMXCoreAsmPrinter.a
+${PLIST.XCore}lib/libLLVMXCoreCodeGen.a
+${PLIST.XCore}lib/libLLVMXCoreDesc.a
+${PLIST.XCore}lib/libLLVMXCoreDisassembler.a
+${PLIST.XCore}lib/libLLVMXCoreInfo.a
lib/libLLVMipo.a
lib/libLTO.so
share/llvm/cmake/AddLLVM.cmake
diff --git a/llvm/options.mk b/llvm/options.mk
new file mode 100644
index 0000000..5dc7a4f
--- /dev/null
+++ b/llvm/options.mk
@@ -0,0 +1,38 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.llvm
+
+LLVM_TARGETS= AArch64 AMDGPU ARM BPF CppBackend Hexagon MSP430 Mips NVPTX PowerPC Sparc SystemZ X86 XCore
+
+.for tgt in ${LLVM_TARGETS}
+PLIST_VARS+= ${tgt}
+PKG_SUPPORTED_OPTIONS+= llvm-target-${tgt:tl}
+.endfor
+
+# Probably safe to assume that only x86 users are interested in
+# cross-compilation for now. This saves some build time for everyone else.
+.if !empty(MACHINE_ARCH:Msparc*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-sparc
+.elif !empty(MACHINE_ARCH:Mpowerpc*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-powerpc
+.elif !empty(MACHINE_ARCH:Mearm*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-arm
+.elif !empty(MACHINE_ARCH:M*mips*)
+PKG_SUGGESTED_OPTIONS+= llvm-target-mips
+.else
+# X86 and everyone else get all targets by default.
+. for tgt in ${LLVM_TARGETS}
+PKG_SUGGESTED_OPTIONS+= llvm-target-${tgt:tl}
+. endfor
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.for tgt in ${LLVM_TARGETS}
+. if !empty(PKG_OPTIONS:Mllvm-target-${tgt:tl})
+PLIST.${tgt}= yes
+LLVM_TARGETS_TO_BUILD+= ${tgt}
+. endif
+.endfor
+
+CMAKE_ARGS+= -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS_TO_BUILD:ts;}"
Home |
Main Index |
Thread Index |
Old Index