summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-05 13:31:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-08 15:41:36 +0100
commitb4b24dc53fdb86624da71b854dfe018923a203fe (patch)
tree42aa02975f105f28960e5e5048ef5694d386a92d
parent0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e (diff)
downloadopenembedded-core-contrib-b4b24dc53fdb86624da71b854dfe018923a203fe.tar.gz
rust-llvm: Enable nativesdk variant
To allow nativesdk variants of the tools to build, enable a nativesdk variant of rust-llvm. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/rust/rust-llvm.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rust/rust-llvm.inc b/meta/recipes-devtools/rust/rust-llvm.inc
index 9baad12dc8..625eb57041 100644
--- a/meta/recipes-devtools/rust/rust-llvm.inc
+++ b/meta/recipes-devtools/rust/rust-llvm.inc
@@ -47,6 +47,13 @@ EXTRA_OECMAKE:append:class-target = "\
-DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
"
+EXTRA_OECMAKE:append:class-nativesdk = "\
+ -DCMAKE_CROSSCOMPILING:BOOL=ON \
+ -DLLVM_BUILD_TOOLS=OFF \
+ -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \
+ -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \
+"
+
# The debug symbols are huge here (>2GB) so suppress them since they
# provide almost no value. If you really need them then override this
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
@@ -68,4 +75,4 @@ FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin"
FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"