summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/llvm/llvm_git.bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-30 17:41:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-31 10:40:07 +0100
commit13f8a86122cac43cb0084be0ba94c8ccefc72e29 (patch)
tree6821fbe949cf37d054d7b3bd83417701d2e90690 /meta/recipes-devtools/llvm/llvm_git.bb
parent79cc8584e6e29574ce271eb4a43d0dd9c8879e2c (diff)
downloadpoky-13f8a86122cac43cb0084be0ba94c8ccefc72e29.tar.gz
llvm: Add llvm-config wrapper to improve flags handling
Add a wrapper for llvm-config which provides flags from the current envrionment instead of the values hardcoded into llvm-native at compile time. Inspiration taken from the wrapper in meta-clang but I had to totally rewrite it as: * the TARGET_* prefixes weren't in our environment * meson uses --libs --ldflags XXX which didn't work (From OE-Core rev: 193ee1973f613b72f7f99660aecf652b07652d18) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/llvm/llvm_git.bb')
-rw-r--r--meta/recipes-devtools/llvm/llvm_git.bb10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index bdea95db96..4c7fadb667 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -31,6 +31,7 @@ SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=http
31 file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \ 31 file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \
32 file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ 32 file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
33 file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ 33 file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
34 file://llvm-config \
34 " 35 "
35 36
36UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)" 37UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)"
@@ -124,6 +125,15 @@ do_install() {
124do_install:class-native() { 125do_install:class-native() {
125 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} 126 install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
126 install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV} 127 install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
128 ln -sf llvm-config${PV} ${D}${bindir}/llvm-config
129}
130
131SYSROOT_PREPROCESS_FUNCS:append:class-target = " llvm_sysroot_preprocess"
132
133llvm_sysroot_preprocess() {
134 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
135 install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
136 ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV}
127} 137}
128 138
129PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto" 139PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto"