mirror of
https://git.yoctoproject.org/poky
synced 2026-02-22 01:19:41 +01:00
Brings following changes/fixes * 309d55140c46 [AArch64][GlobalISel] Fix incorrect ABI when tail call not supported (#70215) * 9477268e4247 [AArch64] Add test for #70207 (NFC) * c2eab59e622c [GVN] Fix use-after-free in load PRE with select available value (#69314) * 586481468a07 [clang-tidy] Fix crash in modernize-use-trailing-return-type (#70709) * 9d0ca259eed6 [OpenMP] Fix building for 32-bit DragonFly, NetBSD, OpenBSD (#70527) * a8046f72bfb3 [OpenMP] record-replay use static-cast (#70516) * 12bbcd627f60 [flang] Add comdats to functions with linkonce linkage (#66516) * bdb1553c7639 [mlir] Add pass to add comdat to all linkonce functions (#65270) * 3347c8441588 Update release note for the fix * f6fb6a996c7f [clang][ExprConst] Fix crash on uninitialized array subobject (#67817) * 8c8abe6b93c0 [RISCV] Correct copyPhysReg for GPRPF64. (#70419) * 615beaec04f9 [SVE] Fix incorrect offset calculation when rewriting an instruction's frame index. (#70315) * bb29e1ead22f [MemCpyOpt] Combine alias metadatas when replacing byval arguments (#70580) * 2b82ec7947fe [OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (#65553) * 8909a24d0af1 [libc++] Encode additional ODR-affecting properties in the ABI tag (#69669) * e9dcc15f514a [AArch64] Prevent argument promotion of vector with size > 128 bits (#70034) * 4b7f4152a8d1 [LoongArch] Implement COPY instruction between CFRs (#69300) * fb62a201a199 Revert "[clang-format] Fix align consecutive declarations over function pointers" * 1f6d35b36681 Fix tests for c23 <-> c2x * 030d68ef2cd7 Fix a c23 -> c2x think-o * 2a41d978b4fa [C23] Use thread_local semantics (#70107) * afbe3549af4d [clangd] Disable crashy unchecked-optional-access tidy check (#69427) * 7f790f9a39e3 [ConstraintElim] Don't decompose values wider than 64 bits (#68803) * a1c67ffd0a1f [ConstraintElim] Add test for #68751 (NFC) * ef50a367e3d5 [mlir] Avoid including <alloca.h> on DragonFly * a7101379d75e [LVI][CVP] Treat undef like a full range on abs(x, false) (#68711) * aa03fba83b17 [libcxx] [test] Add a test parameter for disabling memory intensive tests (#68214) * 71f408bc3623 workflows/release-tasks: Fix release note artifact upload (#69522) * 9ab3ce1d7a06 Bump version to 17.0.4 * 880a282a40e3 workflows/release-lit: Pass correct build directory to pypa/gh-action-pypi-publish (#69438) * 8719ee0cb39a workflows/release-lit: Fix dev suffix removal (#69397) (From OE-Core rev: 198f10d12eea50942acb60cdf8c7bc0700065df1) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
174 lines
5.8 KiB
BlitzBasic
174 lines
5.8 KiB
BlitzBasic
# Copyright (C) 2017 Khem Raj <raj.khem@gmail.com>
|
|
# Released under the MIT license (see COPYING.MIT for the terms)
|
|
|
|
SUMMARY = "The LLVM Compiler Infrastructure"
|
|
HOMEPAGE = "http://llvm.org"
|
|
LICENSE = "Apache-2.0-with-LLVM-exception"
|
|
SECTION = "devel"
|
|
|
|
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
|
|
|
DEPENDS = "libffi libxml2 zlib zstd libedit ninja-native llvm-native"
|
|
|
|
RDEPENDS:${PN}:append:class-target = " ncurses-terminfo"
|
|
|
|
inherit cmake pkgconfig
|
|
|
|
PV = "17.0.4"
|
|
|
|
MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}"
|
|
|
|
LLVM_RELEASE = "${PV}"
|
|
|
|
BRANCH = "release/${MAJOR_VERSION}.x"
|
|
SRCREV = "309d55140c46384b6de7a7573206cbeba3f7077f"
|
|
SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=https \
|
|
file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
|
|
file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
|
|
file://llvm-config \
|
|
"
|
|
|
|
UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)"
|
|
|
|
S = "${WORKDIR}/git/llvm"
|
|
|
|
LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install"
|
|
|
|
def get_llvm_arch(bb, d, arch_var):
|
|
import re
|
|
a = d.getVar(arch_var)
|
|
if re.match(r'(i.86|athlon|x86.64)$', a): return 'X86'
|
|
elif re.match(r'arm$', a): return 'ARM'
|
|
elif re.match(r'armeb$', a): return 'ARM'
|
|
elif re.match(r'aarch64$', a): return 'AArch64'
|
|
elif re.match(r'aarch64_be$', a): return 'AArch64'
|
|
elif re.match(r'mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips'
|
|
elif re.match(r'riscv(32|64)(eb|)$', a): return 'RISCV'
|
|
elif re.match(r'p(pc|owerpc)(|64)', a): return 'PowerPC'
|
|
else:
|
|
raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a)
|
|
|
|
def get_llvm_host_arch(bb, d):
|
|
return get_llvm_arch(bb, d, 'HOST_ARCH')
|
|
|
|
PACKAGECONFIG ??= "libllvm"
|
|
PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libllvm', '', d)}"
|
|
# if optviewer OFF, force the modules to be not found or the ones on the host would be found
|
|
PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"
|
|
PACKAGECONFIG[libllvm] = ""
|
|
|
|
#
|
|
# Default to build all OE-Core supported target arches (user overridable).
|
|
#
|
|
LLVM_TARGETS ?= "AMDGPU;${@get_llvm_host_arch(bb, d)}"
|
|
|
|
ARM_INSTRUCTION_SET:armv5 = "arm"
|
|
ARM_INSTRUCTION_SET:armv4t = "arm"
|
|
|
|
EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
|
|
-DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \
|
|
-DLLVM_ENABLE_PIC=ON \
|
|
-DLLVM_BINDINGS_LIST='' \
|
|
-DLLVM_LINK_LLVM_DYLIB=ON \
|
|
-DLLVM_ENABLE_FFI=ON \
|
|
-DLLVM_ENABLE_RTTI=ON \
|
|
-DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
|
|
-DLLVM_OPTIMIZED_TABLEGEN=ON \
|
|
-DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS}' \
|
|
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
"
|
|
|
|
EXTRA_OECMAKE:append:class-target = "\
|
|
-DCMAKE_CROSSCOMPILING:BOOL=ON \
|
|
-DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
|
|
-DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \
|
|
"
|
|
|
|
EXTRA_OECMAKE:append:class-nativesdk = "\
|
|
-DCMAKE_CROSSCOMPILING:BOOL=ON \
|
|
-DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \
|
|
-DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \
|
|
"
|
|
|
|
# patch out build host paths for reproducibility
|
|
do_compile:prepend:class-target() {
|
|
sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm-config/BuildVariables.inc
|
|
}
|
|
|
|
do_compile() {
|
|
if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
|
|
ninja -v ${PARALLEL_MAKE}
|
|
else
|
|
ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
|
|
fi
|
|
}
|
|
|
|
do_install() {
|
|
if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
|
|
DESTDIR=${D} ninja -v install
|
|
|
|
# llvm harcodes usr/lib as install path, so this corrects it to actual libdir
|
|
mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true
|
|
|
|
# Remove opt-viewer: https://llvm.org/docs/Remarks.html
|
|
rm -rf ${D}${datadir}/opt-viewer
|
|
rmdir ${D}${datadir}
|
|
|
|
# reproducibility
|
|
sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
|
|
fi
|
|
}
|
|
|
|
do_install:append:class-native() {
|
|
install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
|
|
install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
|
|
ln -sf llvm-config${PV} ${D}${bindir}/llvm-config
|
|
}
|
|
|
|
SYSROOT_PREPROCESS_FUNCS:append:class-target = " llvm_sysroot_preprocess"
|
|
|
|
llvm_sysroot_preprocess() {
|
|
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
|
install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
|
|
ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
|
|
}
|
|
|
|
PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto"
|
|
|
|
RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks"
|
|
|
|
FILES:${PN}-bugpointpasses = "\
|
|
${libdir}/BugpointPasses.so \
|
|
"
|
|
|
|
FILES:${PN}-libllvm = "\
|
|
${libdir}/libLLVM-${MAJOR_VERSION}.so \
|
|
"
|
|
|
|
FILES:${PN}-liblto += "\
|
|
${libdir}/libLTO.so.* \
|
|
"
|
|
|
|
FILES:${PN}-liboptremarks += "\
|
|
${libdir}/libRemarks.so.* \
|
|
"
|
|
|
|
FILES:${PN}-llvmhello = "\
|
|
${libdir}/LLVMHello.so \
|
|
"
|
|
|
|
FILES:${PN}-dev += " \
|
|
${libdir}/llvm-config \
|
|
${libdir}/libRemarks.so \
|
|
${libdir}/libLLVM-${PV}.so \
|
|
"
|
|
|
|
FILES:${PN}-staticdev += "\
|
|
${libdir}/*.a \
|
|
"
|
|
|
|
INSANE_SKIP:${PN}-libllvm += "dev-so"
|
|
|
|
BBCLASSEXTEND = "native nativesdk"
|