Skip to content

Commit

Permalink
libclc: Define llvm tools needed during build
Browse files Browse the repository at this point in the history
It pokes at target llvm.cmake and gets the path
LLVM_TOOLS_BINARY_DIR pointing to target sysroot
however during cross builds it should be looking
for tools for cross building in native sysroot

MJ: otherwise it may fail to build with gold linker:
    DWARF error: invalid or unhandled FORM value: 0x23

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 5563999)
  • Loading branch information
kraj committed Sep 8, 2023
1 parent 40d1e66 commit f141703
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions recipes-devtools/clang/libclc_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ OECMAKE_SOURCEPATH = "${S}/libclc"

EXTRA_OECMAKE += " \
-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
-DLLVM_CLANG=${STAGING_BINDIR_NATIVE}/clang \
-DLLVM_AS=${STAGING_BINDIR_NATIVE}/llvm-as \
-DLLVM_LINK=${STAGING_BINDIR_NATIVE}/llvm-link \
-DLLVM_OPT=${STAGING_BINDIR_NATIVE}/opt \
-DLLVM_SPIRV=${STAGING_BINDIR_NATIVE}/llvm-spirv \
-Dclc_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeCLCCompiler.cmake.in \
-Dll_comp_in:FILEPATH=${OECMAKE_SOURCEPATH}/cmake/CMakeLLAsmCompiler.cmake.in \
"
Expand Down

0 comments on commit f141703

Please sign in to comment.