diff mbox series

llvm: Enable libllvm for native build

Message ID 20240808092350.3078687-1-mingli.yu@windriver.com
State Accepted, archived
Commit c4f08872bff303998dc15c7d224a49abc5e74965
Headers show
Series llvm: Enable libllvm for native build | expand

Commit Message

Yu, Mingli Aug. 8, 2024, 9:23 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

The bpftrace recipe under meta-clang[1] needs llvm-objcopy [2] during
do_confgure phase otherwise there comes below error:
  | CMake Error at tests/data/CMakeLists.txt:6 (find_program):
  |   Could not find LLVM_OBJCOPY using the following names: llvm-objcopy,
  |   llvm-objcopy-18, llvm18-objcopy

The commit ec22bfa67f llvm: allow building libllvm in native builds, subject to PACKAGECONFIG [3]
introduces libllvm to manage the llvm function for native build
maybe because there is only mesa-native to use llvm-native.

Considering there are other recipes such as bpftrace needs llvm-native,
so enable libllvm for native build.

[1] https://github.com/kraj/meta-clang
[2] https://github.com/bpftrace/bpftrace/blob/master/tests/data/CMakeLists.txt
[3] https://git.openembedded.org/openembedded-core/commit/?id=ec22bfa67f6f1766102501d4593ce29aafe8c166

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta/recipes-devtools/llvm/llvm_18.1.8.bb | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/llvm/llvm_18.1.8.bb b/meta/recipes-devtools/llvm/llvm_18.1.8.bb
index a700a1b2b1..bf8d869662 100644
--- a/meta/recipes-devtools/llvm/llvm_18.1.8.bb
+++ b/meta/recipes-devtools/llvm/llvm_18.1.8.bb
@@ -54,7 +54,6 @@  def get_llvm_host_arch(bb, d):
     return get_llvm_arch(bb, d, 'HOST_ARCH')
 
 PACKAGECONFIG ??= "libllvm"
-PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libllvm', '', d)}"
 # if optviewer OFF, force the modules to be not found or the ones on the host would be found
 PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"
 PACKAGECONFIG[libllvm] = ""