RECIPE_MAINTAINER:pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@gmail.com>"
RECIPE_MAINTAINER:pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>"
RECIPE_MAINTAINER:pn-llvm-project-source-20.1.7 = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER:pn-llvm-tblgen-native = "Khem Raj <raj.khem@gmail.com>"
RECIPE_MAINTAINER:pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>"
RECIPE_MAINTAINER:pn-log4cplus = "Unassigned <unassigned@yoctoproject.org>"
RECIPE_MAINTAINER:pn-lrzsz = "Anuj Mittal <anuj.mittal@intel.com>"
-DLLDB_PYTHON_EXT_SUFFIX=${SOLIBSDEV} \
"
-DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native"
+DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native llvm-tblgen-native"
DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} virtual/nativesdk-cross-binutils nativesdk-python3"
DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcxx', '', d)} spirv-llvm-translator-native"
install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clangd-indexer ${D}${bindir}/clangd-indexer
fi
install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tidy-confusable-chars-gen ${D}${bindir}/clang-tidy-confusable-chars-gen
- install -Dm 0755 ${B}${BINPATHPREFIX}/bin/clang-tblgen ${D}${bindir}/clang-tblgen
- install -Dm 0755 ${B}${BINPATHPREFIX}/bin/lldb-tblgen ${D}${bindir}/lldb-tblgen
- install -Dm 0755 ${B}${BINPATHPREFIX}/bin/llvm-min-tblgen ${D}${bindir}/llvm-min-tblgen
install -Dm 0755 ${B}${BINPATHPREFIX}/bin/prepare_builtins ${D}${bindir}/prepare_builtins
for f in `find ${D}${bindir} -executable -type f -not -type l`; do
test -n "`file -b $f|grep -i ELF`" && ${STRIP} $f
echo "stripped $f"
done
- ln -sf clang-tblgen ${D}${bindir}/clang-tblgen${PV}
- ln -sf llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
ln -sf llvm-config ${D}${bindir}/llvm-config${PV}
+
+ # These are provided by llvm-tblgen-native
+ rm ${D}${bindir}/*-tblgen
}
do_install:append:class-nativesdk () {
--- /dev/null
+SUMMARY = "LLVM TableGen binaries, for the build host"
+SECTION = "devel"
+
+# Building the LLVM projects often means using the TableGen tools (llvm-tblgen,
+# etc). We could build these as part of llvm-native, but there are cases where
+# this would be overkill. For example, building a target LLDB needs native
+# tablegen binaries and a target libllvm so having to build a complete native
+# llvm is not needed.
+
+require common-clang.inc
+require common-source.inc
+
+inherit cmake pkgconfig native
+
+OECMAKE_SOURCEPATH = "${S}/llvm"
+
+EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS='llvm;clang;lldb'"
+
+BINARIES = "llvm-min-tblgen llvm-tblgen clang-tblgen lldb-tblgen"
+
+OECMAKE_TARGET_COMPILE = "${BINARIES}"
+
+do_install() {
+ for f in ${BINARIES}; do
+ install -D ${B}/bin/$f ${D}${bindir}/$f
+ done
+}