diff options
author | Zoltán Böszörményi <zboszor@pr.hu> | 2021-03-10 11:54:34 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-03-10 12:29:22 -0800 |
commit | 9007cf073e40c429fa5e729dda114e4248a99b57 (patch) | |
tree | ffd833d0e51496bd4ced139a80b13416758597ed | |
parent | 3fbc916a7987f15f874f40f9e5b531eb72bffc7a (diff) | |
download | meta-clang-9007cf073e40c429fa5e729dda114e4248a99b57.tar.gz |
clang: Install lld for target builds
LLDTargets.cmake (generated and installed by the lld build)
references lld this way:
add_executable(lld IMPORTED)
set_property(TARGET lld PROPERTY ENABLE_EXPORTS 1)
This way lld can be used by plugins to get their symbols from,
pretty much like PHP modules that resolve their symbols from the
php executable during runtime linking.
At least https://github.com/RadeonOpenCompute/ROCm-CompilerSupport
uses lld's cmake files as opposed to using only llvm and previously
failed with:
| The imported target "lld" references the file
|
| ".../tmp-sicom-glibc/work/corei7-64-sicom-linux/amd-comgr/4.0.0-r0/recipe-sysroot/usr/bin/lld"
|
| but this file does not exist. Possible reasons include:
|
| * The file was deleted, renamed, or moved to another location.
|
| * An install or uninstall procedure did not complete successfully.
|
| * The installation package was faulty and contained
Extending SYSROOT_DIRS with ${bindir} would break crosscompiling
since CMake found clang/clang++ from recipe-sysroot in this case.
Install lld into sysroot-destdir but nothing else.
Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
-rw-r--r-- | recipes-devtools/clang/clang_git.bb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 87e426f..b8986be 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb | |||
@@ -303,4 +303,7 @@ clang_sysroot_preprocess() { | |||
303 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | 303 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ |
304 | install -m 0755 ${S}/../llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | 304 | install -m 0755 ${S}/../llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ |
305 | ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} | 305 | ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} |
306 | # LLDTargets.cmake references the lld executable(!) that some modules/plugins link to | ||
307 | install -d ${SYSROOT_DESTDIR}${bindir} | ||
308 | install -m 755 ${D}${bindir}/lld ${SYSROOT_DESTDIR}${bindir}/ | ||
306 | } | 309 | } |