llvm cleanup
cover llvm cleanup
The following changes since commit 1cd30e7929f3cdfd2d97db2888d1bcb5e165d546:
busybox: Follow OE-Core update to 1.12.1 version (2013-07-06 00:38:05 +0200)
are available in the git repository at:
git://git.openembedded.org/meta-openembedded-contrib jansa/llvm
http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=jansa/deps
Martin Jansa (4):
llvm: Consolidate .inc files
llvm2: don't install llvm-config to bindir
llvm: use newer class-native overrides instead of virtclass
llvm: split packages a bit more
meta-oe/recipes-core/llvm/llvm-common.bb | 2 +- meta-oe/recipes-core/llvm/llvm.inc | 224 +++++-------------------------- meta-oe/recipes-core/llvm/llvm2.8_2.8.bb | 9 +- meta-oe/recipes-core/llvm/llvm2.9_2.9.bb | 30 +---- meta-oe/recipes-core/llvm/llvm2.inc | 175 ++++++++++++++++++++++++ meta-oe/recipes-core/llvm/llvm3.2_3.2.bb | 104 +------------- meta-oe/recipes-core/llvm/llvm3.3_3.3.bb | 100 +------------- meta-oe/recipes-core/llvm/llvm3.inc | 80 +++++++++++ 8 files changed, 299 insertions(+), 425 deletions(-) create mode 100644 meta-oe/recipes-core/llvm/llvm2.inc create mode 100644 meta-oe/recipes-core/llvm/llvm3.inc
Signature · 1 line
1.8.2.1
PATCH 1/4 llvm: Consolidate .inc files
* unlike other recipes where we have a rule to keep only one version, llvm is different so we'll keep .inc files
* llvm.inc is shared by all, llvm[23].inc are separated because 2.* is built with cmake and 3.* with automake
* fix staticdev packaging and move it to shared llvm.inc FILES_${PN}-static-dev = "${libdir}/${LLVM_DIR}/*.a" (it's staticdev not static-dev)
--- meta-oe/recipes-core/llvm/llvm.inc | 210 ++----------------------------- meta-oe/recipes-core/llvm/llvm2.8_2.8.bb | 9 +- meta-oe/recipes-core/llvm/llvm2.9_2.9.bb | 30 +---- meta-oe/recipes-core/llvm/llvm2.inc | 194 ++++++++++++++++++++++++++++ meta-oe/recipes-core/llvm/llvm3.2_3.2.bb | 104 +-------------- meta-oe/recipes-core/llvm/llvm3.3_3.3.bb | 100 +-------------- meta-oe/recipes-core/llvm/llvm3.inc | 84 +++++++++++++ 7 files changed, 303 insertions(+), 428 deletions(-) create mode 100644 meta-oe/recipes-core/llvm/llvm2.inc create mode 100644 meta-oe/recipes-core/llvm/llvm3.inc
meta-oe/recipes-core/llvm/llvm.inc +13 -197
@@ -19,208 +19,24 @@ DESCRIPTION = "The Low Level Virtual Machine" HOMEPAGE = "http://llvm.org" + # 3-clause BSD-like +# University of Illinois/NCSA Open Source License LICENSE = "NCSA" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=0ac5f799a2d89477c75b0a378b221855" - -DEPENDS = "llvm${LLVM_RELEASE}-native llvm-common" -DEPENDS_virtclass-native = "llvm-common-native cmake-native" - -INC_PR = "r2" - -SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.tgz" - -S = "${WORKDIR}/llvm-${PV}" - -inherit cmake perlnative pythonnative +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8" -# Defines the LLVM supported arches. By now we always build either for ${BUILD} -# (native) or ${TARGET}. In the future it may make sense to enable all backends -# for the non-native build. The decision which backends are used is made by -# the 3rd party program or library that uses llvm anyway. -LLVM_ARCH = "${@get_llvm_arch(d)}" +# 2.* inherits also cmake +# 3.* inherits also automake +inherit perlnative pythonnative -# This is used for generating the install directory for the llvm libraries, -# binaries and headers. It makes side by side installation of those possible. LLVM_RELEASE = "${PV}" +LLVM_DIR = "llvm${LLVM_RELEASE}" -# llvm *must* be built out of tree -OECMAKE_SOURCEPATH = ".." -OECMAKE_BUILDPATH = "build" -EXTRA_OECMAKE = "\ - -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm${LLVM_RELEASE}/tblgen \ - -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \ - -DCMAKE_LINKER:FILEPATH=${LD} \ - -DCMAKE_AR:FILEPATH=${AR} \ - -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ - -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ - -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ - -DCMAKE_STRIP:FILEPATH=${STRIP} \ - -DNM_PATH:FILEPATH=${NM} \ - -DLLVM_ENABLE_PIC:BOOL=ON \ - -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \ - -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \ +FILES_${PN}-dbg += "${bindir}/${LLVM_DIR}/.debug \ + ${libdir}/${LLVM_DIR}/.debug \ " -# We need to reset this to avoid breakage as we build out of tree -TOOLCHAIN_OPTIONS = "" - -PACKAGES_DYNAMIC = "llvm-*" - -# the difference to the non-native build is that we do not need -# to declare the location of the tblgen executable. -EXTRA_OECMAKE_virtclass-native = "\ - -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \ - -DCMAKE_LINKER:FILEPATH=${LD} \ - -DCMAKE_AR:FILEPATH=${AR} \ - -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ - -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ - -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ - -DCMAKE_STRIP:FILEPATH=${STRIP} \ - -DNM_PATH:FILEPATH=${NM} \ +FILES_${PN}-dev += "${bindir} \ + ${libdir}/${LLVM_DIR}/BugpointPasses.so \ + ${libdir}/${LLVM_DIR}/LLVMHello.so \ " - -PACKAGES_virtclass-native = "" - -PACKAGES_DYNAMIC_virtclass-native = "" - -python populate_packages_prepend () { - libllvm_libdir = bb.data.expand('${libdir}/llvm${LLVM_RELEASE}', d) - do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Split package for %s', allow_dirs=True) -} - -FILES_${PN} = "" -ALLOW_EMPTY_${PN} = "1" - -FILES_${PN}-dbg += "${libdir}/llvm${LLVM_RELEASE}/.debug ${bindir}/llvm${LLVM_RELEASE}/.debug" - -FILES_${PN}-dev = " \ - ${includedir} \ - ${bindir}/* \ - ${libdir}/llvm${LLVM_RELEASE}/LLVMHello.so \ - ${libdir}/llvm${LLVM_RELEASE}/BugpointPasses.so \ - ${libdir}/llvm${LLVM_RELEASE}/*.a \ -" - -base_do_compile_prepend() { - # Avoid *** No rule to make target `native/bin/tblgen', needed by `include/llvm/Intrinsics.gen.tmp' - oe_runmake tblgen -} - -do_install() { - # Install into a private directory to be able to reorganize the files. - - cd ${OECMAKE_BUILDPATH} - - oe_runmake DESTDIR=${WORKDIR}/llvm-install install - - # Create our custom target directories - install -d ${D}${bindir}/llvm${LLVM_RELEASE} - install -d ${D}${includedir}/llvm${LLVM_RELEASE} - install -d ${D}${libdir}/llvm${LLVM_RELEASE} - - # Move headers into their own directory - cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm \ - ${D}${includedir}/llvm${LLVM_RELEASE}/ - cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \ - ${D}${includedir}/llvm${LLVM_RELEASE}/ - - find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \ - install {} ${D}${libdir}/llvm${LLVM_RELEASE} \; - - # I dont know another way out. Binaries are installed into a special subdir - find ${WORKDIR}/llvm-install/${prefix}/bin -name "*" -maxdepth 1 -exec \ - install {} ${D}${bindir}/llvm${LLVM_RELEASE} \; - - # LLVM does not install this by default. - install bin/tblgen ${D}${bindir}/llvm${LLVM_RELEASE} - - # we install it here unmodified for native and none native and overwrite it - # later for native case - install -d ${D}${bindir} - install -m 0755 bin/llvm-config ${D}${bindir} -} - -SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_sysroot_preprocess" - -llvm_sysroot_preprocess() { - cd ${OECMAKE_BUILDPATH} - - # Fix the paths in the config script to make it find the binaries and - # library files. Doing so allows 3rd party configure scripts working - # unmodified. - sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \ - -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \ - -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \ - -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \ - bin/llvm-config > bin/llvm-config${LLVM_RELEASE} - - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} - install -m 0755 bin/llvm-config${LLVM_RELEASE} ${SYSROOT_DESTDIR}${bindir_crossscripts} -} - -do_install_virtclass-native() { - # Install into a private directory to be able to reorganize the files. - - cd ${OECMAKE_BUILDPATH} - - oe_runmake DESTDIR=${WORKDIR}/llvm-install install - - # Create our custom target directories - install -d ${D}${bindir}/llvm${LLVM_RELEASE} - install -d ${D}${includedir}/llvm${LLVM_RELEASE} - install -d ${D}${libdir}/llvm${LLVM_RELEASE} - - # Move headers into their own directory - cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm \ - ${D}${includedir}/llvm${LLVM_RELEASE}/ - cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \ - ${D}${includedir}/llvm${LLVM_RELEASE}/ - - find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \ - install {} ${D}${libdir}/llvm${LLVM_RELEASE} \; - - # I dont know another way out. Binaries are installed into a special subdir - find ${WORKDIR}/llvm-install/${prefix}/bin -name "*" -maxdepth 1 -exec \ - install {} ${D}${bindir}/llvm${LLVM_RELEASE} \; - - # LLVM does not install this by default. - install bin/tblgen ${D}${bindir}/llvm${LLVM_RELEASE} - - # Fix the paths in the config script to make it find the binaries and - # library files. Doing so allows 3rd party configure scripts working - # unmodified. - sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \ - -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \ - -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \ - -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \ - bin/llvm-config > bin/llvm-config${LLVM_RELEASE} - - install -d ${D}${bindir} - install -m 0755 bin/llvm-config${LLVM_RELEASE} ${D}${bindir} -} - - -# Retrieve the target in a way that is compatible to the arch -# value in llvm (>= 2.5) -def get_llvm_arch(d): - import bb; - - arch = bb.data.getVar('TARGET_ARCH', d, 1) - if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686": - arch = "X86" - elif arch == "arm": - arch = "ARM" - elif arch == "mipsel" or arch == "mips": - arch = "mips" - elif arch == "powerpc" or arch == "powerpc64": - arch = "PowerPC" - else: - bb.warn("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) ); - - return arch - -BBCLASSEXTEND = "native" - +FILES_${PN}-staticdev = "${libdir}/${LLVM_DIR}/*.a"
meta-oe/recipes-core/llvm/llvm2.8_2.8.bb +2 -7
@@ -1,10 +1,7 @@ require llvm.inc +require llvm2.inc -#LICENSE = "University of Illinois/NCSA Open Source License" -LICENSE = "NCSA" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=0ac5f799a2d89477c75b0a378b221855" - -PR = "${INC_PR}.2" +PR = "r3" SRC_URI += " \ file://30may-llvm2.8-pr399-ppc-arm.patch \
@@ -13,8 +10,6 @@ SRC_URI += " \ file://llvm-mc_disable.patch \ " -LLVM_RELEASE = "2.8" - EXTRA_OECMAKE += " -DBUILD_SHARED_LIBS:BOOL=OFF " SRC_URI[md5sum] = "220d361b4d17051ff4bb21c64abe05ba"
meta-oe/recipes-core/llvm/llvm2.9_2.9.bb +4 -26
@@ -1,9 +1,12 @@ require llvm.inc +require llvm2.inc -PR = "${INC_PR}.0" +PR = "r3" SRC_URI += "file://0035-gcc-4.7.patch" +ARM_INSTRUCTION_SET = "arm" + # 0019-issue6065.patch is still needed but a bit modified, because it was resolved by # http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?r1=120304&r2=124694&pathrev=124694 # http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMJITInfo.cpp?diff_format=h&r1=57911&r2=57910&pathrev=57911
@@ -11,33 +14,8 @@ SRC_URI += "file://0035-gcc-4.7.patch" # {standard input}:31: Error: invalid register list to push/pop instruction -- `pop {r0,r1,r2,r3,lr}' # make[2]: *** [lib/Target/ARM/CMakeFiles/LLVMARMCodeGen.dir/ARMJITInfo.cpp.o] Error 1 # SRC_URI += "file://0019-issue6065.patch" -ARM_INSTRUCTION_SET = "arm" SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch " -LLVM_EXTRA_ARCH = "X86;" -LLVM_EXTRA_ARCH_x86 = "" -LLVM_EXTRA_ARCH_x86-64 = "" - -EXTRA_OECMAKE = "\ - -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm${LLVM_RELEASE}/tblgen \ - -DLLVM_TARGETS_TO_BUILD="${LLVM_EXTRA_ARCH}${LLVM_ARCH}" \ - -DCMAKE_LINKER:FILEPATH=${LD} \ - -DCMAKE_AR:FILEPATH=${AR} \ - -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ - -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ - -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ - -DCMAKE_STRIP:FILEPATH=${STRIP} \ - -DNM_PATH:FILEPATH=${NM} \ - -DLLVM_ENABLE_PIC:BOOL=ON \ - -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \ - -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \ - -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ - -DBUILD_SHARED_LIBS:BOOL=ON \ - -DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \ -" - -LLVM_RELEASE = "2.9" - SRC_URI[md5sum] = "793138412d2af2c7c7f54615f8943771" SRC_URI[sha256sum] = "661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779"
meta-oe/recipes-core/llvm/llvm2.inc new file +194 -0
194 lines not on this page · raw message
meta-oe/recipes-core/llvm/llvm3.2_3.2.bb +4 -100
109 lines not on this page · raw message
meta-oe/recipes-core/llvm/llvm3.3_3.3.bb +2 -98
107 lines not on this page · raw message
meta-oe/recipes-core/llvm/llvm3.inc new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
1.8.2.1
PATCH 2/4 llvm2: don't install llvm-config to bindir
* there is llvm-config in binconfig/LLVM_RELEASE
* this one was creating conflict between different llvm*-dev versions installed on target:
./llvm2.9/2.9-r3/packages-split/llvm2.9-dev/usr/bin/llvm2.9/llvm-config ./llvm2.9/2.9-r3/packages-split/llvm2.9-dev/usr/bin/llvm-config ./llvm2.8/2.8-r3/packages-split/llvm2.8-dev/usr/bin/llvm2.8/llvm-config ./llvm2.8/2.8-r3/packages-split/llvm2.8-dev/usr/bin/llvm-config
--- meta-oe/recipes-core/llvm/llvm2.inc | 5 ----- 1 file changed, 5 deletions(-)
meta-oe/recipes-core/llvm/llvm2.inc +0 -5
@@ -110,11 +110,6 @@ do_install() { # LLVM does not install this by default. install bin/tblgen ${D}${bindir}/${LLVM_DIR} - - # we install it here unmodified for native and none native and overwrite it - # later for native case - install -d ${D}${bindir} - install -m 0755 bin/llvm-config ${D}${bindir} } SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_sysroot_preprocess"
Signature · 1 line
1.8.2.1
PATCH 3/4 llvm: use newer class-native overrides instead of virtclass
In reply to Martin Jansa--- meta-oe/recipes-core/llvm/llvm-common.bb | 2 +- meta-oe/recipes-core/llvm/llvm2.inc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
meta-oe/recipes-core/llvm/llvm-common.bb +1 -1
@@ -14,7 +14,7 @@ llvm_common_sysroot_preprocess() { install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ } -do_install_virtclass-native() { +do_install_class-native() { install -d ${D}${bindir} install -m 0755 ${WORKDIR}/llvm-config ${D}${bindir} }
meta-oe/recipes-core/llvm/llvm2.inc +5 -5
@@ -1,5 +1,5 @@ DEPENDS = "llvm${LLVM_RELEASE}-native llvm-common" -DEPENDS_virtclass-native = "llvm-common-native cmake-native" +DEPENDS_class-native = "llvm-common-native cmake-native" SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.tgz" S = "${WORKDIR}/llvm-${PV}"
@@ -57,7 +57,7 @@ PACKAGES_DYNAMIC = "llvm-*" # the difference to the non-native build is that we do not need # to declare the location of the tblgen executable. -EXTRA_OECMAKE_virtclass-native = "\ +EXTRA_OECMAKE_class-native = "\ -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \ -DCMAKE_LINKER:FILEPATH=${LD} \ -DCMAKE_AR:FILEPATH=${AR} \
@@ -68,9 +68,9 @@ EXTRA_OECMAKE_virtclass-native = "\ -DNM_PATH:FILEPATH=${NM} \ " -PACKAGES_virtclass-native = "" +PACKAGES_class-native = "" -PACKAGES_DYNAMIC_virtclass-native = "" +PACKAGES_DYNAMIC_class-native = "" python populate_packages_prepend () { libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d)
@@ -130,7 +130,7 @@ llvm_sysroot_preprocess() { install -m 0755 bin/llvm-config${LLVM_RELEASE} ${SYSROOT_DESTDIR}${bindir_crossscripts} } -do_install_virtclass-native() { +do_install_class-native() { # Install into a private directory to be able to reorganize the files. cd ${LLVM_BUILD_DIR} oe_runmake DESTDIR=${LLVM_INSTALL_DIR} install
Signature · 1 line
1.8.2.1
PATCH 4/4 llvm: split packages a bit more
In reply to Martin Jansa* use split for llvm3.* like we did for llvm2.*
* use PACKAGESPLITFUNCS instead of populate_packages_prepend
* improve regexp in PACKAGES_DYNAMIC
* append ${LLVM_RELEASE} to split package name, otherwise sstate will complain about multiple recipes trying to install pkgdata
* split also -staticdev and -dbg libs, PN-dbg and PN-staticdev were huge, let old PN-dbg/PN-staticdev to RDEPEND on splitted packages
* mesa packages libegl-gallium, libgbm-gallium, mesa-driver-pipe-swrast, mesa-driver-pipe-vmwgfx, mesa-driver-swrast, mesa-driver-vmwgfx are now depending only on libllvm3.2-llvm-3.2 (>= 3.2) instead of main llvm3.2 package, but for llvm-3* it's not big improvement (installed size wise), because libLLVM-3.2.so was creating 99% of that size.
* there are still some huge packages:
llvm2.8-dbg is huge because BUILD_SHARED_LIBS is disabled for 2.8
causing all binaries in ${bindir}/.debug to contain big
static libs llvm2.9 is missing, because it has BUILD_SHARED_LIBS enabled and
unlike 3.* it doesn't build static versions at all unless explicitly requested
51M llvm-test/llvm3.2/3.2-r0/packages-split/libllvm3.2-llvmselectiondag-staticdev 53M llvm-test/llvm2.8/2.8-r3/packages-split/llvm2.8-dev 54M llvm-test/llvm2.8/2.8-r3/packages-split/libllvm2.8-llvmanalysis-staticdev 55M llvm-test/llvm3.3/3.3-r0/packages-split/libllvm3.3-llvmselectiondag-staticdev 62M llvm-test/llvm3.2/3.2-r0/packages-split/libllvm3.2-llvmanalysis-staticdev 63M llvm-test/llvm3.3/3.3-r0/packages-split/libllvm3.3-llvmanalysis-staticdev 67M llvm-test/llvm2.9/2.9-r3/packages-split/llvm2.9-dbg 90M llvm-test/llvm3.2/3.2-r0/packages-split/llvm3.2-dbg 92M llvm-test/llvm3.3/3.3-r0/packages-split/llvm3.3-dbg 102M llvm-test/llvm2.8/2.8-r3/packages-split/libllvm2.8-llvmcodegen-staticdev 127M llvm-test/llvm3.2/3.2-r0/packages-split/libllvm3.2-llvmcodegen-staticdev 133M llvm-test/llvm3.3/3.3-r0/packages-split/libllvm3.3-llvmcodegen-staticdev 190M llvm-test/llvm3.2/3.2-r0/packages-split/libllvm3.2-llvm-3.2-dbg 207M llvm-test/llvm3.3/3.3-r0/packages-split/libllvm3.3-llvm-3.3-dbg 628M llvm-test/llvm2.8/2.8-r3/packages-split/llvm2.8-dbg
--- meta-oe/recipes-core/llvm/llvm.inc | 30 ++++++++++++++++++++++++++---- meta-oe/recipes-core/llvm/llvm2.inc | 14 -------------- meta-oe/recipes-core/llvm/llvm3.inc | 4 ---- 3 files changed, 26 insertions(+), 22 deletions(-)
meta-oe/recipes-core/llvm/llvm.inc +26 -4
@@ -32,11 +32,33 @@ inherit perlnative pythonnative LLVM_RELEASE = "${PV}" LLVM_DIR = "llvm${LLVM_RELEASE}" -FILES_${PN}-dbg += "${bindir}/${LLVM_DIR}/.debug \ - ${libdir}/${LLVM_DIR}/.debug \ +ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY_${PN}-staticdev = "1" +FILES_${PN} = "" +FILES_${PN}-staticdev = "" +DOTDEBUG-dbg = " ${bindir}/${LLVM_DIR}/.debug \ + ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \ + ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \ + /usr/src/debug \ " -FILES_${PN}-dev += "${bindir} \ + +FILES_${PN}-dev += "${bindir}/${LLVM_DIR} \ ${libdir}/${LLVM_DIR}/BugpointPasses.so \ ${libdir}/${LLVM_DIR}/LLVMHello.so \ " -FILES_${PN}-staticdev = "${libdir}/${LLVM_DIR}/*.a" + +PACKAGES_DYNAMIC = "^libllvm-.*$" + +python llvm_populate_packages() { + libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d) + split_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True) + split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True) + split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True) + if split_packages: + pn = d.getVar('PN', True) + d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages)) + d.appendVar('RDEPENDS_' + pn + '-dbg', ' '+' '.join(split_dbg_packages)) + d.appendVar('RDEPENDS_' + pn + '-staticdev', ' '+' '.join(split_staticdev_packages)) +} + +PACKAGESPLITFUNCS_prepend = "llvm_populate_packages "
meta-oe/recipes-core/llvm/llvm2.inc +0 -14
@@ -53,8 +53,6 @@ EXTRA_OECMAKE = "\ # We need to reset this to avoid breakage as we build out of tree TOOLCHAIN_OPTIONS = "" -PACKAGES_DYNAMIC = "llvm-*" - # the difference to the non-native build is that we do not need # to declare the location of the tblgen executable. EXTRA_OECMAKE_class-native = "\
@@ -68,18 +66,6 @@ EXTRA_OECMAKE_class-native = "\ -DNM_PATH:FILEPATH=${NM} \ " -PACKAGES_class-native = "" - -PACKAGES_DYNAMIC_class-native = "" - -python populate_packages_prepend () { - libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d) - do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Split package for %s', allow_dirs=True) -} - -FILES_${PN} = "" -ALLOW_EMPTY_${PN} = "1" - base_do_compile_prepend() { # Avoid *** No rule to make target `native/bin/tblgen', needed by `include/llvm/Intrinsics.gen.tmp' oe_runmake tblgen
meta-oe/recipes-core/llvm/llvm3.inc +0 -4
@@ -18,10 +18,6 @@ EXTRA_OECONF += "--disable-assertions \ --enable-shared \ --enable-targets=host-only" EXTRA_OEMAKE += "REQUIRES_RTTI=1 VERBOSE=1" -FILES_${PN} = "${libdir}/lib*.so \ - ${libdir}/${LLVM_DIR}/*" -FILES_SOLIBSDEV = "" -INSANE_SKIP_${PN} = "dev-so" do_configure_prepend() { # Remove RPATHs
Signature · 1 line
1.8.2.1