@@ -47,7 +47,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
bitbake("{} -c test_compile".format(recipe))
builddir = get_bb_var("RUSTSRC", "rust")
# build core-image-minimal with required packages
- default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd", "openssl"]
+ default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd", "llvm", "openssl"]
features = []
features.append('IMAGE_FEATURES += "ssh-server-dropbear"')
features.append('CORE_IMAGE_EXTRA_INSTALL += "{0}"'.format(" ".join(default_installed_packages)))
@@ -124,6 +124,7 @@ python do_configure() {
# [llvm]
config.add_section("llvm")
+ config.set("llvm", "link-shared", e(True))
config.set("llvm", "static-libstdcpp", e(False))
config.set("llvm", "download-ci-llvm", e(False))
if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""):
@@ -188,7 +189,7 @@ python do_configure() {
bb.build.exec_func("setup_cargo_environment", d)
}
-# llvm-config expects static libraries to be in the 'lib' directory rather than 'lib64' when
+# llvm-config expects static/dynamic libraries to be in the 'lib' directory rather than 'lib64' when
# multilibs enabled. Since we are copying the natively built llvm-config into the target sysroot
# and executing it there, it will default to searching in 'lib', as it is unaware of the 'lib64'
# directory. To ensure llvm-config can locate the necessary libraries, create a symlink from 'lib'
@@ -205,7 +206,7 @@ do_compile:append:class-target() {
# Only do per-file symlinking if lib is a real directory (not symlink)
if [ -d "$lib_dir" ] && [ ! -L "$lib_dir" ]; then
- for lib64_file in "${lib64_dir}"/libLLVM*.a; do
+ for lib64_file in "${lib64_dir}"/libLLVM*.a "${lib64_dir}"/libLLVM*.so*; do
if [ -e "$lib64_file" ]; then
lib_name=$(basename "${lib64_file}")
target_link="${lib_dir}/${lib_name}"