SUMMARY="Modular and reuseable compiler and toolchain technologies" DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \ toolchain technologies.The LLVM compiler system for C and C++ includes the \ following: - Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \ parsers. They support the ANSI-standard C and C++ languages to the same \ degree that GCC supports them. Additionally, many GCC extensions are \ supported. - A stable implementation of the LLVM instruction set, which serves as both \ the online and offline code representation, together with assembly (ASCII) \ and bytecode (binary) readers and writers, and a verifier. - A powerful pass-management system that automatically sequences passes \ (including analysis, transformation, and code-generation passes) based on \ their dependences, and pipelines them for efficiency. - A wide range of global scalar optimizations. - A link-time interprocedural optimization framework with a rich set of \ analyses and transformations, including sophisticated whole-program pointer \ analysis, call graph construction, and support for profile-guided optimizations. - An easily retargettable code generator, which currently supports X86, \ X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \ SystemZ, and XCore. - A Just-In-Time (JIT) code generation system, which currently supports X86, \ X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64. - Support for generating DWARF debugging information. - A C back-end useful for testing and for generating native code on targets \ other than the ones listed above. - A profiling system similar to gprof. - A test framework with a number of benchmark codes and applications. - APIs and debugging tools to simplify rapid development of LLVM components." HOMEPAGE="https://www.llvm.org/" COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign" LICENSE="UIUC" REVISION="1" SOURCE_URI="https://releases.llvm.org/${portVersion}/llvm-${portVersion}.src.tar.xz" SOURCE_URI_2="https://releases.llvm.org/${portVersion}/cfe-${portVersion}.src.tar.xz" SOURCE_URI_3="https://releases.llvm.org/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz" SOURCE_URI_4="https://releases.llvm.org/${portVersion}/compiler-rt-${portVersion}.src.tar.xz" CHECKSUM_SHA256="e35dcbae6084adcf4abb32514127c5eabd7d63b733852ccdb31e06f1373136da" CHECKSUM_SHA256_2="019f23c2192df793ac746595e94a403908749f8e0c484b403476d2611dd20970" CHECKSUM_SHA256_3="87d078b959c4a6e5ff9fd137c2f477cadb1245f93812512996f73986a6d973c6" CHECKSUM_SHA256_4="d5ad5266462134a482b381f1f8115b6cad3473741b3bb7d1acc7f69fd0f0c0b3" SOURCE_DIR="llvm-$portVersion.src" SOURCE_DIR_2="cfe-$portVersion.src" SOURCE_DIR_3="clang-tools-extra-$portVersion.src" SOURCE_DIR_4="compiler-rt-$portVersion.src" PATCHES="llvm-$portVersion.patchset" PATCHES_2="clang-$portVersion.patchset" ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" SECONDARY_ARCHITECTURES="?x86" PROVIDES=" llvm$secondaryArchSuffix = $portVersion cmd:bugpoint cmd:find_all_symbols cmd:llc cmd:lli cmd:llvm_ar cmd:llvm_as cmd:llvm_bcanalyzer cmd:llvm_c_test cmd:llvm_cat cmd:llvm_config cmd:llvm_cov cmd:llvm_cvtres cmd:llvm_cxxdump cmd:llvm_cxxfilt cmd:llvm_diff cmd:llvm_dis cmd:llvm_dlltool cmd:llvm_dsymutil cmd:llvm_dwarfdump cmd:llvm_dwp cmd:llvm_extract cmd:llvm_lib cmd:llvm_link cmd:llvm_lto cmd:llvm_lto2 cmd:llvm_mc cmd:llvm_mcmarkup cmd:llvm_modextract cmd:llvm_mt cmd:llvm_nm cmd:llvm_objdump cmd:llvm_opt_report cmd:llvm_pdbdump cmd:llvm_pdbutil cmd:llvm_profdata cmd:llvm_ranlib cmd:llvm_readelf cmd:llvm_readobj cmd:llvm_rtdyld cmd:llvm_size cmd:llvm_split cmd:llvm_stress cmd:llvm_strings cmd:llvm_symbolizer cmd:llvm_tblgen cmd:llvm_xray cmd:obj2yaml cmd:opt cmd:sancov cmd:sanstats cmd:verify_uselistorder cmd:yaml2obj lib:BugpointPasses$secondaryArchSuffix lib:LLVMHello$secondaryArchSuffix devel:libfindAllSymbols$secondaryArchSuffix devel:libLLVM_$portVersion$secondaryArchSuffix devel:libLLVM_5.0$secondaryArchSuffix devel:libLLVM$secondaryArchSuffix devel:libLLVMAArch64AsmParser$secondaryArchSuffix devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix devel:libLLVMAArch64CodeGen$secondaryArchSuffix devel:libLLVMAArch64Desc$secondaryArchSuffix devel:libLLVMAArch64Disassembler$secondaryArchSuffix devel:libLLVMAArch64Info$secondaryArchSuffix devel:libLLVMAArch64Utils$secondaryArchSuffix devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix devel:libLLVMAMDGPUDesc$secondaryArchSuffix devel:libLLVMAMDGPUDisassembler$secondaryArchSuffix devel:libLLVMAMDGPUInfo$secondaryArchSuffix devel:libLLVMAMDGPUUtils$secondaryArchSuffix devel:libLLVMARMAsmParser$secondaryArchSuffix devel:libLLVMARMAsmPrinter$secondaryArchSuffix devel:libLLVMARMCodeGen$secondaryArchSuffix devel:libLLVMARMDesc$secondaryArchSuffix devel:libLLVMARMDisassembler$secondaryArchSuffix devel:libLLVMARMInfo$secondaryArchSuffix devel:libLLVMAnalysis$secondaryArchSuffix devel:libLLVMAsmParser$secondaryArchSuffix devel:libLLVMAsmPrinter$secondaryArchSuffix devel:libLLVMBinaryFormat$secondaryArchSuffix devel:libLLVMBitReader$secondaryArchSuffix devel:libLLVMBitWriter$secondaryArchSuffix devel:libLLVMBPFAsmPrinter$secondaryArchSuffix devel:libLLVMBPFCodeGen$secondaryArchSuffix devel:libLLVMBPFDesc$secondaryArchSuffix devel:libLLVMBPFDisassembler$secondaryArchSuffix devel:libLLVMBPFInfo$secondaryArchSuffix devel:libLLVMCodeGen$secondaryArchSuffix devel:libLLVMCore$secondaryArchSuffix devel:libLLVMCoroutines$secondaryArchSuffix devel:libLLVMCoverage$secondaryArchSuffix devel:libLLVMDebugInfoCodeView$secondaryArchSuffix devel:libLLVMDebugInfoDWARF$secondaryArchSuffix devel:libLLVMDebugInfoMSF$secondaryArchSuffix devel:libLLVMDebugInfoPDB$secondaryArchSuffix devel:libLLVMDemangle$secondaryArchSuffix devel:libLLVMDlltoolDriver$secondaryArchSuffix devel:libLLVMExecutionEngine$secondaryArchSuffix devel:libLLVMGlobalISel$secondaryArchSuffix devel:libLLVMHexagonAsmParser$secondaryArchSuffix devel:libLLVMHexagonCodeGen$secondaryArchSuffix devel:libLLVMHexagonDesc$secondaryArchSuffix devel:libLLVMHexagonDisassembler$secondaryArchSuffix devel:libLLVMHexagonInfo$secondaryArchSuffix devel:libLLVMIRReader$secondaryArchSuffix devel:libLLVMInstCombine$secondaryArchSuffix devel:libLLVMInstrumentation$secondaryArchSuffix devel:libLLVMInterpreter$secondaryArchSuffix devel:libLLVMLanaiAsmParser$secondaryArchSuffix devel:libLLVMLanaiAsmPrinter$secondaryArchSuffix devel:libLLVMLanaiCodeGen$secondaryArchSuffix devel:libLLVMLanaiDesc$secondaryArchSuffix devel:libLLVMLanaiDisassembler$secondaryArchSuffix devel:libLLVMLanaiInfo$secondaryArchSuffix devel:libLLVMLanaiInstPrinter$secondaryArchSuffix devel:libLLVMLTO$secondaryArchSuffix devel:libLLVMLibDriver$secondaryArchSuffix devel:libLLVMLineEditor$secondaryArchSuffix devel:libLLVMLinker$secondaryArchSuffix devel:libLLVMMC$secondaryArchSuffix devel:libLLVMMCDisassembler$secondaryArchSuffix devel:libLLVMMCJIT$secondaryArchSuffix devel:libLLVMMCParser$secondaryArchSuffix devel:libLLVMMIRParser$secondaryArchSuffix devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix devel:libLLVMMSP430CodeGen$secondaryArchSuffix devel:libLLVMMSP430Desc$secondaryArchSuffix devel:libLLVMMSP430Info$secondaryArchSuffix devel:libLLVMMipsAsmParser$secondaryArchSuffix devel:libLLVMMipsAsmPrinter$secondaryArchSuffix devel:libLLVMMipsCodeGen$secondaryArchSuffix devel:libLLVMMipsDesc$secondaryArchSuffix devel:libLLVMMipsDisassembler$secondaryArchSuffix devel:libLLVMMipsInfo$secondaryArchSuffix devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix devel:libLLVMNVPTXCodeGen$secondaryArchSuffix devel:libLLVMNVPTXDesc$secondaryArchSuffix devel:libLLVMNVPTXInfo$secondaryArchSuffix devel:libLLVMObjCARCOpts$secondaryArchSuffix devel:libLLVMObject$secondaryArchSuffix devel:libLLVMObjectYAML$secondaryArchSuffix devel:libLLVMOption$secondaryArchSuffix devel:libLLVMOrcJIT$secondaryArchSuffix devel:libLLVMPasses$secondaryArchSuffix devel:libLLVMPowerPCAsmParser$secondaryArchSuffix devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix devel:libLLVMPowerPCCodeGen$secondaryArchSuffix devel:libLLVMPowerPCDesc$secondaryArchSuffix devel:libLLVMPowerPCDisassembler$secondaryArchSuffix devel:libLLVMPowerPCInfo$secondaryArchSuffix devel:libLLVMProfileData$secondaryArchSuffix devel:libLLVMRISCVCodeGen$secondaryArchSuffix devel:libLLVMRISCVDesc$secondaryArchSuffix devel:libLLVMRISCVInfo$secondaryArchSuffix devel:libLLVMRuntimeDyld$secondaryArchSuffix devel:libLLVMScalarOpts$secondaryArchSuffix devel:libLLVMSelectionDAG$secondaryArchSuffix devel:libLLVMSparcAsmParser$secondaryArchSuffix devel:libLLVMSparcAsmPrinter$secondaryArchSuffix devel:libLLVMSparcCodeGen$secondaryArchSuffix devel:libLLVMSparcDesc$secondaryArchSuffix devel:libLLVMSparcDisassembler$secondaryArchSuffix devel:libLLVMSparcInfo$secondaryArchSuffix devel:libLLVMSupport$secondaryArchSuffix devel:libLLVMSymbolize$secondaryArchSuffix devel:libLLVMSystemZAsmParser$secondaryArchSuffix devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix devel:libLLVMSystemZCodeGen$secondaryArchSuffix devel:libLLVMSystemZDesc$secondaryArchSuffix devel:libLLVMSystemZDisassembler$secondaryArchSuffix devel:libLLVMSystemZInfo$secondaryArchSuffix devel:libLLVMTableGen$secondaryArchSuffix devel:libLLVMTarget$secondaryArchSuffix devel:libLLVMTransformUtils$secondaryArchSuffix devel:libLLVMVectorize$secondaryArchSuffix devel:libLLVMX86AsmParser$secondaryArchSuffix devel:libLLVMX86AsmPrinter$secondaryArchSuffix devel:libLLVMX86CodeGen$secondaryArchSuffix devel:libLLVMX86Desc$secondaryArchSuffix devel:libLLVMX86Disassembler$secondaryArchSuffix devel:libLLVMX86Info$secondaryArchSuffix devel:libLLVMX86Utils$secondaryArchSuffix devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix devel:libLLVMXCoreCodeGen$secondaryArchSuffix devel:libLLVMXCoreDesc$secondaryArchSuffix devel:libLLVMXCoreDisassembler$secondaryArchSuffix devel:libLLVMXCoreInfo$secondaryArchSuffix devel:libLLVMXRay$secondaryArchSuffix devel:libLLVMipo$secondaryArchSuffix devel:libLTO$secondaryArchSuffix " REQUIRES=" haiku$secondaryArchSuffix lib:libLLVM_5.0$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_clang=" llvm${secondaryArchSuffix}_clang = $portVersion cmd:clang = $portVersion cmd:clangd = $portVersion cmd:clang_5.0 = $portVersion cmd:clang++ = $portVersion cmd:clang_apply_replacements = $portVersion cmd:clang_change_namespace = $portVersion cmd:clang_check = $portVersion cmd:clang_cl = $portVersion cmd:clang_cpp = $portVersion cmd:clang_format = $portVersion cmd:clang_import_test = $portVersion cmd:clang_include_fixer = $portVersion cmd:clang_offload_bundler = $portVersion cmd:clang_query = $portVersion cmd:clang_rename = $portVersion cmd:clang_reorder_fields = $portVersion cmd:clang_tidy = $portVersion cmd:c_index_test = $portVersion cmd:git_clang_format = $portVersion cmd:modularize = $portVersion lib:libclang$secondaryArchSuffix = $portVersion devel:libclang$secondaryArchSuffix = $portVersion devel:libclangarcmigrate$secondaryArchSuffix = $portVersion devel:libclangast$secondaryArchSuffix = $portVersion devel:libclangastmatchers$secondaryArchSuffix = $portVersion devel:libclanganalysis$secondaryArchSuffix = $portVersion devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion devel:libclangbasic$secondaryArchSuffix = $portVersion devel:libclangchangenamespace$secondaryArchSuffix = $portVersion devel:libclangcodegen$secondaryArchSuffix = $portVersion devel:libclangdaemon$secondaryArchSuffix = $portVersion devel:libclangdriver$secondaryArchSuffix = $portVersion devel:libclangdynamicastmatchers$secondaryArchSuffix = $portVersion devel:libclangedit$secondaryArchSuffix = $portVersion devel:libclangformat$secondaryArchSuffix = $portVersion devel:libclangfrontend$secondaryArchSuffix = $portVersion devel:libclangfrontendtool$secondaryArchSuffix = $portVersion devel:libclangincludefixer$secondaryArchSuffix = $portVersion devel:libclangincludefixerplugin$secondaryArchSuffix = $portVersion devel:libclangindex$secondaryArchSuffix = $portVersion devel:libclanglex$secondaryArchSuffix = $portVersion devel:libclangmove$secondaryArchSuffix = $portVersion devel:libclangparse$secondaryArchSuffix = $portVersion devel:libclangquery$secondaryArchSuffix = $portVersion devel:libclangrename$secondaryArchSuffix = $portVersion devel:libclangreorderfields$secondaryArchSuffix = $portVersion devel:libclangrewrite$secondaryArchSuffix = $portVersion devel:libclangrewritefrontend$secondaryArchSuffix = $portVersion devel:libclangsema$secondaryArchSuffix = $portVersion devel:libclangserialization$secondaryArchSuffix = $portVersion devel:libclangstaticanalyzercheckers$secondaryArchSuffix = $portVersion devel:libclangstaticanalyzercore$secondaryArchSuffix = $portVersion devel:libclangstaticanalyzerfrontend$secondaryArchSuffix = $portVersion devel:libclangtidy$secondaryArchSuffix = $portVersion devel:libclangtidyandroidmodule$secondaryArchSuffix = $portVersion devel:libclangtidyboostmodule$secondaryArchSuffix = $portVersion devel:libclangtidybugpronemodule$secondaryArchSuffix = $portVersion devel:libclangtidycertmodule$secondaryArchSuffix = $portVersion devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion devel:libclangtidyhicppmodule$secondaryArchSuffix = $portVersion devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion devel:libclangtidymodernizemodule$secondaryArchSuffix = $portVersion devel:libclangtidympimodule$secondaryArchSuffix = $portVersion devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion devel:libclangtidyplugin$secondaryArchSuffix = $portVersion devel:libclangtidyreadability$secondaryArchSuffix = $portVersion devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion devel:libclangtidyutils$secondaryArchSuffix = $portVersion devel:libclangtooling$secondaryArchSuffix = $portVersion devel:libclangtoolingcore$secondaryArchSuffix = $portVersion devel:libclangtoolingrefactor$secondaryArchSuffix = $portVersion " REQUIRES_clang=" haiku$secondaryArchSuffix lib:libLLVM_5.0$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_clang_analysis=" llvm${secondaryArchSuffix}_clang_analysis = $portVersion cmd:c++_analyzer = $portVersion cmd:ccc_analyzer = $portVersion cmd:scan_build = $portVersion cmd:scan_view = $portVersion " REQUIRES_clang_analysis=" llvm${secondaryArchSuffix}_clang == $portVersion base cmd:python " PROVIDES_libs=" llvm${secondaryArchSuffix}_libs = $portVersion lib:libLLVM_5.0$secondaryArchSuffix lib:libLTO$secondaryArchSuffix " REQUIRES_libs=" haiku$secondaryArchSuffix lib:libz$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:cmake cmd:diff cmd:find cmd:gcc$secondaryArchSuffix cmd:groff cmd:ld$secondaryArchSuffix cmd:make cmd:python cmd:sed cmd:grep " BUILD() { # Add clang tools mkdir -p tools/clang cp -rd $sourceDir2/* tools/clang/ # Add clang tools's tool's (really llvm?) mkdir -p tools/clang/tools/extra cp -rd $sourceDir3/* tools/clang/tools/extra mkdir -p projects/compiler-rt cp -rd $sourceDir4/* projects/compiler-rt local cmakeFlags if [ -n "$secondaryArchSuffix" ]; then cmakeFlags=-DHAIKU_HYBRID_SECONDARY="\"${effectiveTargetArchitecture}\"" fi mkdir -p build; cd build # Haiku C++ requires rtti in a lot of central system components # such as Mesa cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \ -DCMAKE_SKIP_RPATH=YES $cmakeFlags \ -DLLVM_ENABLE_RTTI=ON -DLLVM_LINK_LLVM_DYLIB=YES \ .. make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \ PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir } INSTALL() { cd build mkdir -p $binDir $developDir $dataDir $docDir $includeDir $manDir make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \ PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \ PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir make -C projects/compiler-rt install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \ PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir if [ -n $secondaryArchSuffix ]; then mv $prefix/lib $prefix/lib2 mkdir -p $libDir mv $prefix/lib2/* $libDir/ rmdir $prefix/lib2 binDir=$prefix/bin fi # You can try and be fancy here parsing each arch in a for loop... but # not all arches contain the same libraries. The inventory for each arch # also changes between releases... so lets KISS. prepareInstalledDevelLibs \ libfindAllSymbols \ libLLVM* \ libLTO \ libclang* mv $prefix/include/* $includeDir/ mv $prefix/libexec/* $binDir/ mv $prefix/share/man/* $manDir/ mv $prefix/share/clang $dataDir/ mv $prefix/share/opt-viewer $dataDir/ mv $prefix/share/scan-build $dataDir/ mv $prefix/share/scan-view $dataDir/ rmdir $prefix/include $prefix/libexec $prefix/share/man $prefix/share sed -i 's|/libexec/|/bin/|' $binDir/scan-build sed -i 's|/share/|/data/|' $binDir/scan-build $binDir/scan-view # clang package packageEntries clang \ $binDir/c-index-test \ $binDir/clang* \ $binDir/git-clang-format \ $binDir/modularize \ $dataDir/clang \ $includeDir/clang* \ $libDir/libclang* \ $libDir/clang \ $libDir/cmake/clang \ $developLibDir/libclang* # analysis package packageEntries clang_analysis \ $binDir/scan-build \ $binDir/scan-view \ $binDir/c++-analyzer \ $binDir/ccc-analyzer \ $dataDir/scan-build \ $dataDir/scan-view \ $manDir/man1/scan-build.1 # libs package packageEntries libs \ $libDir/libLLVM* \ $libDir/libLTO* } TEST() { cd build make $jobArgs check make $jobArgs check-clang }