From patchwork Thu Aug 8 09:23:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yu, Mingli" X-Patchwork-Id: 47514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 757D0C3DA4A for ; Thu, 8 Aug 2024 09:23:56 +0000 (UTC) Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by mx.groups.io with SMTP id smtpd.web11.55708.1723109032512991352 for ; Thu, 08 Aug 2024 02:23:52 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.166.238, mailfrom: prvs=895057963b=mingli.yu@windriver.com) Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4786e9X3015937 for ; Thu, 8 Aug 2024 02:23:52 -0700 Received: from ala-exchng02.corp.ad.wrs.com (ala-exchng02.wrs.com [147.11.82.254]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 40v0c91e05-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 08 Aug 2024 02:23:52 -0700 (PDT) Received: from ala-exchng01.corp.ad.wrs.com (147.11.82.252) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 8 Aug 2024 02:23:51 -0700 Received: from pek-lpg-core4.wrs.com (128.224.153.44) by ala-exchng01.corp.ad.wrs.com (147.11.82.252) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 8 Aug 2024 02:23:50 -0700 From: To: Subject: [PATCH] llvm: Enable libllvm for native build Date: Thu, 8 Aug 2024 17:23:50 +0800 Message-ID: <20240808092350.3078687-1-mingli.yu@windriver.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: BxwPgQb2do6sfZZMWAV0i2rRuX16IZH4 X-Proofpoint-GUID: BxwPgQb2do6sfZZMWAV0i2rRuX16IZH4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-08_07,2024-08-07_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 mlxlogscore=835 priorityscore=1501 lowpriorityscore=0 bulkscore=0 adultscore=0 clxscore=1011 spamscore=0 phishscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.21.0-2407110000 definitions=main-2408080067 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 08 Aug 2024 09:23:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/203121 From: Mingli Yu 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 --- meta/recipes-devtools/llvm/llvm_18.1.8.bb | 1 - 1 file changed, 1 deletion(-) 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] = ""