From patchwork Sat Jul 25 03:51:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepesh Varatharajan X-Patchwork-Id: 93480 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 53E21C53209 for ; Sat, 25 Jul 2026 03:52:03 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.33829.1784951516426368773 for ; Fri, 24 Jul 2026 20:51:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=oiezaH00; 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.178.238, mailfrom: prvs=166643924b=deepesh.varatharajan@windriver.com) Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66P3ptcQ3192368; Sat, 25 Jul 2026 03:51:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=PPS06212021; bh=CGHBc6KlLNZGIZLhU2FY l8XVcpCxwrtkgF/h7eGWswk=; b=oiezaH00+kPDdU3cgI7q4dzwedD06Lk52oTg SrlmgHGj0CR1SJQTjzpbOwFaWnggwV5HHmBqaNzQZnBwtePy4EzjrvMfCl9YPRIO XhhBcantcigVrQkOyCFaPqcvbZt3oRr17FqaMyG8hWHgNI7QDTxvGiUGLFpbp/vj ORNaxBItSbpxTHD30kYo/pRCOYywhC5FuRmPta/9X5LxUBbODmHrSGY+wq+pNUTh qIyLttNj9ihZ2BvNKtn2YMd7eXduxxwB1xFEN2LYN7D2Jy+9tkMZ9Jdb9XqklC6W wufK0OXK95kqLDfxasBZ1JaQdUG2L9dNmeKJRjcNZLpTu+H5aA== Received: from sj2pr03cu001.outbound.protection.outlook.com (mail-westusazon11012057.outbound.protection.outlook.com [52.101.43.57]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4fmm43r1pt-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sat, 25 Jul 2026 03:51:55 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J79jqSMmhdGMVLyKBjHwqiELl48rPGgftPzz4gPxTWgGYbet+NcRYx2nFQ6H1MZAUDyP69FDe4t/RrmgSrvFytY6/h1/si0Yx3P8Xpofzx+peooW/5OiEWpk0Bxy7vf1w0piD9wB2doaGV9uAN5X4w/d7q8c16SyRi4rggLD9i0FeUVwuYiq2tLrYsQ41xXqwTxe7gMdEKEsJQTnHHyNfAxz8XlJ8zHrCTEFA3nj2hk4gVWvULtLosjb4oUqMhxBJobm1fdu+j44iMH5xnVPHHsMKxYUJr7DM/wOfP3tYpx88oBrmXBkY9p7grA3xfTmCaL4HlwpYZ9l/1E4ok7wgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CGHBc6KlLNZGIZLhU2FYl8XVcpCxwrtkgF/h7eGWswk=; b=TUDtUG+UQZnrraDqDXMK8UMSzLnvAIz9uqOTijuWXvvS0L1MuUaalqzcx77qj1lQPuxRqkBYUOvqCF5caw0Hou32OvTTu7V+jIJiCG1uVvCwEUK3RWf11IpjhPosWcbv/chpwSJ0c583DlRF8FfRuWAOcvQWgdWXkeHn+ji5qD5/5PjQqJbryo6wzynP6yQR7pxSri6s3rBmqjUfVNIoS6tp7IMMcbI8tE+7LvLxEGBu+huy56DDUR0C+g/wnU/9xR+KcKCTNGQCSrk4vTPdZe9dwHpV/+1AqHWMaxZR6u2m7tSJUVp1B6TuQBa4QDlZ5feOnjD/MlTXF0QdXsP/mA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from SN7PR11MB6677.namprd11.prod.outlook.com (2603:10b6:806:26b::6) by DM6PR11MB4625.namprd11.prod.outlook.com (2603:10b6:5:2a8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.12; Sat, 25 Jul 2026 03:51:51 +0000 Received: from SN7PR11MB6677.namprd11.prod.outlook.com ([fe80::490a:519b:d657:99ab]) by SN7PR11MB6677.namprd11.prod.outlook.com ([fe80::490a:519b:d657:99ab%4]) with mapi id 15.21.0245.012; Sat, 25 Jul 2026 03:51:51 +0000 From: Deepesh.Varatharajan@windriver.com To: openembedded-core@lists.openembedded.org Subject: [PATCH v3 1/3] rust: Fix reproducibility with shared source trees Date: Fri, 24 Jul 2026 20:51:32 -0700 Message-ID: <20260725035136.1260408-1-Deepesh.Varatharajan@windriver.com> X-Mailer: git-send-email 2.49.0 X-ClientProxiedBy: BN9P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::24) To SN7PR11MB6677.namprd11.prod.outlook.com (2603:10b6:806:26b::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB6677:EE_|DM6PR11MB4625:EE_ X-MS-Office365-Filtering-Correlation-Id: 48695231-cca3-4782-a00d-08deea000f44 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|52116014|23010399003|366016|38350700014|6133799003|18002099003|12006099003|11063799006|56012099006|10067099003; X-Microsoft-Antispam-Message-Info: WCcnAMpcN5T5w1ro75FkGa8MwUVRal6/7HS+KHjpRkwQvfc5isqPp4ooBMBevECJFetEcCazUtKeOKQzZ+TbTUSlyGi+T2UqkZRTpj7umVvxi7Rcijr9FJ76OA6iCdyzR70QfL2B8TDUVPeKmf0ePDkA7bhefPxQNZa7kdoHyjZoMhLBkNG7Rav1IVqx6nsEMPpNtnB0fe5VqU6xI3/MneMFO2kGuq3nFQmduxWJWnICB3v0IkDwKtfxIg8M04HCOsU8/MlsPwdSM4bqBsyFsiYEois7bDBXohoBWLEJ+TZ6fpewifMFBoCOOPuHifhoFqJc4v7ES68vteQJYJZ1TIpgeVDqU9XdsjC1bn5Mn5D3O3hDm/zFR+rosowJ8ZQOqHVYJ/xu4nqegnwg/wU/nCNFs4iFdTpDH3bZMHaY6pYIzGyKgVbKxRg93BnzdvQKQRMXHd9JeG5dTWlWVxqmFb77CSVaJRJu/b+HxSi8ntwlBaWpMFqNOsE7o2Z4VTNfxnFSTFTyOVH+MGKuwSAcbqi779xeDsTos4qV94jJWheNZ+2u3e9r2dbFnFkCoDnJSvPntKvt2eb0pqxAtEe1IjHMhaS8ejMjkAC+MLFw5X/ruyEvxXRqldJgIpSTuT3jfzTMRXrYeER01o1HYZBz/DrH8bgvFm8kuzpH7/AJ93E= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB6677.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(52116014)(23010399003)(366016)(38350700014)(6133799003)(18002099003)(12006099003)(11063799006)(56012099006)(10067099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PryYa/BgtihgOkV3imSuTcEDQnRV5iMBG/BipxViYgQvwZKu6zGlEdlynOhUx5cb8/OKBX8biiCLYNFOXURVWdTKUcsZ+EFMvHTOCm22sdVillDdpKHHnhsnwfL56DaWnInjQo9+TclwJD6WliDqTKw1e5w6pR1csYSXm2e6+vwAEXOn9dMsoopEkcSWF2hJ8/kBgJDUDrNaG2kxHmtBDQK/RRny+BRRNdNoV9mPy/5HsHuRn4Q51TplTa//tfYWaO4Ivm79vPLCta0SHk9COQNShqADXZ/qnMb2ct+YlJzBTvk5FPRCcLCwYdkzF4c9IHd8hkpnyCrEnx8HTrDYRlr0Mf8YJsBVbAnHawDw4gsL+sXZtY8729TpVVz05tTui0yBTfyNWIGBc+Efz0qpCjMau6iGPQ3eGR9sasRGbWQM/B/V/OuYKgiuYWAijJJU9tTY0iUw+eto5mOQaRATMYe7y0ITdtTrW8cClnqd765effPcnndHvYdx1cnWAMUaINvSD7DCvnq9W4ZsyO9wTL6RlzDSpLcs+//Alxwgbj1DhZxUeCq1Ay39LtMLLjiiwpjuEHqtk9o8z3PgZcT2lsODBDkwDIDcfzcewjL58wawpv303coCK2Uxa7/Rh2oNEM8YdHxgpilsypRbCbkMwAPTiy5odjuDT3VqYnfFQPYkpgrFEfO98z9gh5l+SWHlYNEPWbQTgmGOeI5fCOKrFN3bEXmz6EtHJGIAZ/g1KwWvBVLClMpfD+aOnB2Iqy315MJ8DgQ7oLUZxah1bBMTeQe5Id3wJ+ZUQFs9yn1A3hFZ8zF7Yo8uhcMt1YAj4U4dSvemM7vIrkPdpciPhiGWWYYUiW7qWvVEc2b36xJU33AVXdV3fxEkuUNV6l4T7hbi18nlmJMQ3qMN1QCzqUuKgH6BBt5I3EUxbSdzI/A39GQint4JMldrL/JcbZLtcGvBBrzmujoTDZwHuj8xKZv6hEpWp6jJslfsbykftZilEXsp9jq0MdDN7tvyLd4vgjmjeijUXG5QfFA8n5iov793VPTsvatdViLecshAo3q9SeMa0BP4KFoUoEr+Ywta1HyWf9A8df0wqfXgHnUpkf0eSfAzG/W+r4et6OGPhm3OuP0Ai4801Cr8SKcA72uSZkRWyqsF6xQnmOEYB5rhst2ekcCg+fK9YyScY/URqQ8U/Tboqu9/Wp/95Qk6zPi+mK4QfTVcds7Q0pVpycW4OIcdiltltLzLDwKMShqh9VD6lwdZDX+lFFpOyrNSJKYUeVF5tqyMYEvtE1Yt6vIEPMl5VN6RtJIwIY2OcuzrcwFbrJYlWL869JQshH7DIarJHLfZzU250l8q38FGkSTxxwyPolmsM5QXTgoM3U9aIKrQXuBxvD11ewse2PBubKGJqhAM1Z5EZJeH3umOUTIK59JpU0HADt5r1OI8YV6Zhr1qFErWLeIEGuBgRysXLQ/jLwB+LJ1Cpczu0G+dJ2Tjcy4wmNMRzO+2Ie+21GKgPzPpYOa+qJavhxTDDYEWpLePXPxVPACq8h+tfL3cZex2LG6BpVvmkOyLMxmef7Z1gGoN4etJ4hL8wWA0ZJoe46yasNEuwbkfRRr2iZlo8vB1eqcbZlVV/xBM52mksO/Bsi7wLGT5C11qMnP64FwMlWZ7eq8KcApr45x95Itxa91G5Lnnz7PwxFfHCjV59pdyBDRT62xhbCWIyT+DmnFLqO5jad6RDGUNrNozWYJk9/V6GohJBysgJ0db1QnZjZEz+W9iWgbvt26BYsBVHxI460yIiv+u X-Exchange-RoutingPolicyChecked: KoZ6wsqBc0xEJj7Db2xZxsEvNwS1Odtkv37ZrhpttbTBg16WRgLr2mv0JIxqaEDx4G+WgwLNUJurOCR5MVOI1Kh69ochJNAFdjFqxeG5+Nh05Q9cBstwPOaUkcaT480udFQ8820QYoJo307Clo7lLZRkxnHc+/YooL4uHQoTTCZDkM+LXg++CmHVeKpeywoyhNkxYu89EXPcp0wjmavPTrJD5f2pTpNC0BpWMpdicUDXdvVtU76Hlu7jMubk/g7eoSx6Jy6O4Vy0DdqxE07TqJG2itST1qCGd+Cq72EbXlyoX4wSuOv/PVQoLxw66HKx2oBFrmBzmDReGkh8qULylw== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48695231-cca3-4782-a00d-08deea000f44 X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB6677.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2026 03:51:51.2298 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uYmPpljB5nUdEyhDPkRTZFpYUnRf4ADfHhMj5YwfgjhE1ofcmvAhK/CVIh3lpWnTMrVl8nmSQ0Ep6vIMCUFLHX1YNNZeIm8VWDFchtL2fqsdSjEOBk3CiVoqgC0BPnZc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4625 X-Authority-Analysis: v=2.4 cv=I/JVgtgg c=1 sm=1 tr=0 ts=6a6432db cx=c_pps a=Y/Y9x3HtMOqQL+YbCjVQEg==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=bi6dqmuHe4P4UrxVR6um:22 a=fTW__CHxibyLmBMfj2wP:22 a=NEAV23lmAAAA:8 a=ei4SEBeUAAAA:8 a=t7CeM3EgAAAA:8 a=XTdeb_U8USiAPbms4-gA:9 a=8zIOOLb7Ym0NljyPXbuS:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: 2MiunUpbCTaAYXApXJKvO2OVBsmUjNJd X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI1MDAzMiBTYWx0ZWRfX0TGXkOw9mLFU 2C6ififwQf01d+Y8wIB66TI08TFvbyCxAYc/vwWwT/x1J6/AMUId828cKqX+RMYxUv4z7B+MT0S lkjlopmutyamX8dOJVaWowuOsXmSoMEPUoR47+4x+NNtAFyB2fJUzURuRjngd3P5W2xSNOEJS5L 3potXlEvYKd/tmWm+AY5p+LcyHHLbEyVNFbyx8N196bNk+ZCrG+w7hhjPGizK/fX78pVQjJoLCl 5XUVnmIcNM9LggPcilIbtyYA9vQjT3t8NyoBSZZVJi6rWTKstJlf41paCSYKika0QrKxPHeKL1+ C1iv1jq6BV83ggRogYYMKYd0Ydmk5GHfOKSKatFXF6zil+ogBCXMlDaYQrJ7yhhqZkLpJVGmNIo p+gAb4R+Zj7XfSji6YqGm+g3qvonrt2a0ZK7OEwvzJdmpe+7rM/K3o6dFXV8FU5d+phNyQ0L8xH Cu6XOx4esRX8/jJUwwg== X-Proofpoint-ORIG-GUID: 2MiunUpbCTaAYXApXJKvO2OVBsmUjNJd X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI1MDAzMiBTYWx0ZWRfXzyEHeQqrg2LO CpL9Mm7MG4oYxdc1PHD6tIzNz3KGObMbKyDlbm8R2V3ihVMO3NFwz+BEMPref9JKZD+kuqLDCE0 zy0hmsXAAZwlfE3/ejl6A062yJYsYRf5KfYeVfMCexgPrRRjZu93 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-25_01,2026-07-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 impostorscore=0 malwarescore=0 clxscore=1015 phishscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607250032 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 25 Jul 2026 03:52:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241955 From: Deepesh Varatharajan Backport an upstream Rust commit to fix a reproducibility issue when Rust family recipes share the same source tree. Signed-off-by: Deepesh Varatharajan --- ...ild-script-path-leakage-in-artifacts.patch | 28 +++++++++++++++++++ meta/recipes-devtools/rust/rust-source.inc | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-devtools/rust/files/0005-remap-OUT_DIR-paths-to-fix-build-script-path-leakage-in-artifacts.patch diff --git a/meta/recipes-devtools/rust/files/0005-remap-OUT_DIR-paths-to-fix-build-script-path-leakage-in-artifacts.patch b/meta/recipes-devtools/rust/files/0005-remap-OUT_DIR-paths-to-fix-build-script-path-leakage-in-artifacts.patch new file mode 100644 index 0000000000..8c93624df7 --- /dev/null +++ b/meta/recipes-devtools/rust/files/0005-remap-OUT_DIR-paths-to-fix-build-script-path-leakage-in-artifacts.patch @@ -0,0 +1,28 @@ +Backport a commit that remap OUT_DIR paths to fix build script path leakage in artifacts + +Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/e743a4db62336027dcc1f1a755f4ca35f56b67df] + +Signed-off-by: Deepesh Varatharajan + +diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs +index f785254..0264667 100644 +--- a/src/bootstrap/src/core/builder/cargo.rs ++++ b/src/bootstrap/src/core/builder/cargo.rs +@@ -1077,6 +1077,8 @@ impl Builder<'_> { + // rustc creates absolute paths (in part bc of the `rust-src` unremap + // and for working directory) so let's remap the build directory as well. + format!("{}={map_to}", self.build.src.display()), ++ // remap OUT_DIR so they don't leak into artifacts. ++ format!("{}={map_to}/out", self.build.out.display()), + ] + .join("\t"); + cargo.env("RUSTC_DEBUGINFO_MAP", map); +@@ -1097,6 +1099,8 @@ impl Builder<'_> { + // rustc creates absolute paths (in part bc of the `rust-src` unremap + // and for working directory) so let's remap the build directory as well. + format!("{}={map_to}", self.build.src.display()), ++ // remap OUT_DIR so they don't leak into artifacts. ++ format!("{}={map_to}/out", self.build.out.display()), + ] + .join("\t"); + cargo.env("RUSTC_DEBUGINFO_MAP", map); diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index a8d8de7165..5678e00671 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc @@ -9,6 +9,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n file://0002-Fix-rust-build-failure-with-unstable-options.patch;patchdir=${RUSTSRC} \ file://0003-explicit-tail-calls-disable-two-tests.patch;patchdir=${RUSTSRC} \ file://0004-explicit-tail-calls-ignore-tests-on-unsupported-llvm.patch;patchdir=${RUSTSRC} \ + file://0005-remap-OUT_DIR-paths-to-fix-build-script-path-leakage-in-artifacts.patch;patchdir=${RUSTSRC} \ " SRC_URI[rust.sha256sum] = "77a6ff3003a4ad0cb00697b043c879e3e1a15d945b1a1f63818903bfc3fa8b98" From patchwork Sat Jul 25 03:51:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Deepesh Varatharajan X-Patchwork-Id: 93479 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 24785C531C9 for ; Sat, 25 Jul 2026 03:52:03 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.33964.1784951516937945500 for ; Fri, 24 Jul 2026 20:51:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@windriver.com header.s=PPS06212021 header.b=moO4tK68; 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.178.238, mailfrom: prvs=166643924b=deepesh.varatharajan@windriver.com) Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66P3ptcR3192368 for ; Sat, 25 Jul 2026 03:51:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=L3V8g8805EntNUejB4OuEXFGHcjcaB3VSCrorTS+QIk=; b=moO4tK68gYyo K9aCQcxwyZ7ewLriTEqu4IK9HFGjfOGg1QY344jbT04rUtU9M/4KoHFKPUCQF3p+ Y0Ve6dsdFLBON5P7Eu7STh3OV4bcykZDsHPn3aR6qkgBhGZbPf6LNETnmntMQoNh ok5EXMB/xloxGMUl8ZIUHqYVXVJEI+r8OwaqlI/W4G358Y6fqGz72u2FtVehNZcj 9i1i93Px41+pLYGOY+qWryhTLb9pENAZDZ87nmd8COVP03N87u1YpkewH5xx+IjR 1qzk+8KiZl12rpuop9E4i+HKiIV2OU7a7l2f/bNnOMsps9id2fXHFSy9WoJgW22p EsmQpm/Dbw== Received: from sj2pr03cu001.outbound.protection.outlook.com (mail-westusazon11012057.outbound.protection.outlook.com [52.101.43.57]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4fmm43r1pt-2 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sat, 25 Jul 2026 03:51:55 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AYx45VwmqZFeeQTmqjIQLQc74kokIZm0/yj13tvN2vJS72By6WKjK5OoYBiU5b9T5tw8ONr3mfeyidpyr9N2YRmypq9WqhSwrhN/kgrc3euz9znP8cxWrDWCB7gHQmkokp43h7GxLqkuESh18xQbgm/45hhGdpagroDx57PxgunAbO61xYOaNBSQWhyZja3R9jurcYwDna78eH7TFIVToSs/+sjhQeJGBcdElrarAeiyBqyr5Q6P1LCkN9F92fWFfh79iRCgNBcza/BqsXH6RReKqPKEoZSTM9lD6dyWpaiQHkEyHN37ZEJgliirXgIYmCdKazg1IulkXHY2xDStPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L3V8g8805EntNUejB4OuEXFGHcjcaB3VSCrorTS+QIk=; b=WjESB/secX/0RbtS/Pd0tI4hy6Mj3Dg0bnZSrAGgxKAWba7CC7iFYekG5CLb1ZVg9TyTlHThqzblSNY09zq5YFspnH5QGOQRJCeK9IZ1Z+TNy9J3eipYXsMzYwf5UnaMuCft7EDcu7GdFvaFTuGFqdRddFBHePvQ+1mJbdkQG8NbPudOcsPM9Vwfz4beZ2w1TEDhPFbCCjphc6wnj1trOtDMcaO0vx/xy6VwGm4arT479UNPWha0//xg6C3NN7w92WI9M9ESE2XYJmzyzYs1u2Mlc9ERK5ojDvULEwBUDgq4x92FvlrxWvB692rjCbh6UjuXho1olk5W5HZfak9idw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from SN7PR11MB6677.namprd11.prod.outlook.com (2603:10b6:806:26b::6) by DM6PR11MB4625.namprd11.prod.outlook.com (2603:10b6:5:2a8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.12; Sat, 25 Jul 2026 03:51:54 +0000 Received: from SN7PR11MB6677.namprd11.prod.outlook.com ([fe80::490a:519b:d657:99ab]) by SN7PR11MB6677.namprd11.prod.outlook.com ([fe80::490a:519b:d657:99ab%4]) with mapi id 15.21.0245.012; Sat, 25 Jul 2026 03:51:54 +0000 From: Deepesh.Varatharajan@windriver.com To: openembedded-core@lists.openembedded.org Subject: [PATCH v3 2/3] rust: refactor source handling into a shared work-shared recipe Date: Fri, 24 Jul 2026 20:51:33 -0700 Message-ID: <20260725035136.1260408-2-Deepesh.Varatharajan@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260725035136.1260408-1-Deepesh.Varatharajan@windriver.com> References: <20260725035136.1260408-1-Deepesh.Varatharajan@windriver.com> X-ClientProxiedBy: BN9P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::24) To SN7PR11MB6677.namprd11.prod.outlook.com (2603:10b6:806:26b::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB6677:EE_|DM6PR11MB4625:EE_ X-MS-Office365-Filtering-Correlation-Id: 798762eb-6266-416f-fff6-08deea0010f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|52116014|23010399003|366016|29003799003|38350700014|13003099007|6133799003|18002099003|22082099003|12006099003|25016099003|3023799007|11063799006|5023799004|56012099006|10067099003; X-Microsoft-Antispam-Message-Info: koYz5HvFamYqEhj0cmpsbOdDLOX//OLQ7JY2MiZIgDBnmA1s4Nc5iuEyfOSKN4tHprtSwZw0AKSprZ+pUwQ6VRAhlXQCefIAhpzHHthlyl2jWMACPwq6hwdG6xGQZ/Ek+Wpkh8Flu71lj5Ge145ZL+GBIHIe8aRe/q77KyQUqKGiJIEeTQrGvqClKEflAb9p3zTcV+oXrlvGnGzs02fnQlXcgQsI9N0SwumxyShQ/vOQvuv+T06WG9GGqSe2WectRr4M0nmdFzKfSXJjuibvjWd1jPaE4y+znsFMhckWjI90EPuqv1VTuCZbiLu2DcyWGSDqihAcPYWUzwAuLIhSglDeAr9j8ep7IoA5gQ9IpQuNDI/Q9XZEfjwBR71ki3liroxye9PsGttaLj7e2mPi7XZSyOIwmBP/kDP4QbJ5IxGWB7Ec97X3iq/L+MT/0U9rm7bTLiz+lHqaOjn7QqI4OcV7Feu9JGafRxOThhNXC5I5q0DHMN9T9Pf4+3Dw4rSz3y1cqcMFafYLsqP+VpmsdDHIEeD4SzxqOrXBaUUA7tebQUyp/nl+/sEXJ6vwwse/tJXrmNkOjaL5YWrucZA6oCe/2DIi+hv1c67fGd5MkcFuKNdB6dT0tr8+f5MOaWwCCA/A+zl8EtsFPpRu65eiJo+0AgIuQQU8naSau0ZZJj4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB6677.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(52116014)(23010399003)(366016)(29003799003)(38350700014)(13003099007)(6133799003)(18002099003)(22082099003)(12006099003)(25016099003)(3023799007)(11063799006)(5023799004)(56012099006)(10067099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?b0vAm7x3T1feLdp2xBMU+zjSILyq?= =?utf-8?q?QylK8/CerBvmPfGqcjQf0W625KpxOcJ2SQEB0sWUf4+rMwxdSIpHmppPj2nzeaAh9?= =?utf-8?q?FKMN9CE8ikZRYejvDObQTKlp7hX727HeEUfIQEOhg/kboOyPlrTtnvrhwRQQz6t5d?= =?utf-8?q?prYxKuO1kouVh0phdlb2B6ppTh/LzjqO8D8XnS4XIeeed6bdbfO0NruUo8TqvOQT5?= =?utf-8?q?JMikQbNFUVyc69wySHzvIEIVwATHUeTwuMNRZBJ0MtN1gL1b4ZpUxMQnQZoAcLqzs?= =?utf-8?q?1iGMXBl+Mbpzk9IdTc4rPyTsXAw0EBKparFierpF5EjZaapgSNZ8zDEIyHDLDegI+?= =?utf-8?q?9xvQm4sfT0EcI6xdRGgq6bkWRnbwYUn6HBG9wRAdFR+4SfVDMysw5igFquqz80PEk?= =?utf-8?q?DhSxBmeAl98sG84eDZMBHixCC+0hMarkbicpxldq0xiWVnxEBSnaMSIEB5z1Xzjdm?= =?utf-8?q?zLRpSdk0kB4rSscK5MYOROsV6c4Q/fWqhOZW0tCyJiBeRRDE2LojshhXkgs+qJEh3?= =?utf-8?q?heWxnKNH6V7PA/1gGRuS490fKrSwvTwBTsM/x+6MO/iJEPC3Xpxuk2wF49OSDBI5j?= =?utf-8?q?gx1Kt9wEGt3cDYwDDSKChrZlxaqrFijvbCCWd03EPnnf3u57bLwiVaknDcUZQjfYE?= =?utf-8?q?EFVh+fObgO5eFjxZD8MAUYnw91Ef5B0EoL3IqjEb/Ri1JTDR4OgDqPIusY/2YhUqH?= =?utf-8?q?TV/qVgAG3Cptt3B9HVhmpXDqIL1T8UGLFklYzzCe8+/xvYOXh07VKdGt3XStOhWsZ?= =?utf-8?q?iDnnKcmrUp4CdKRFbrtJ+m/WxvQ+/m0kxduqrOaVIJC+yVFXjY18Cu34t4TR4FbWe?= =?utf-8?q?eFetsekdpnUVcEPYfvYReX3RQEa+lcYea7twIAt31BpQoy6LhsyrsPoPw0KEw0GZ9?= =?utf-8?q?skDb8QpMDY7lqBc3JY19b20yT/C3GxrLMlgzIAznnbexK58jYCE7gTObM2+9ihj4Y?= =?utf-8?q?mHD49Xqu8DGETOJuqLUXWjp4Z3dCob7V6fTmWU3lmIizRIyt5w7y2RSCaN7k4OVoR?= =?utf-8?q?EKiedVXMnubyEnh5B0UWLxZ3YKtGSY2VmUac+PoVSCmz+n5+OqCef6wsRV9n43cQe?= =?utf-8?q?xn6Woh4lODdr8XAfa0sEA+0PkZdbCiRWWIHPQvrbhiiLkhnhFgEu7JBF6Lf90VUBo?= =?utf-8?q?OWX6G0dDlXkXPuTrwU3NLzaL/4YuFk7IGumWmPcUx5ZNteo/kh3hjzEyHbVoQWB1r?= =?utf-8?q?PnjSihz7MBovKRt0p7vXcdxtey5n6MI1mIHWiPg1IPdjb9SFR9L0fBnJHaaKv0zQg?= =?utf-8?q?xwkaEAPjtXonUa693pYXgIkQu54vSvn+1S/3lWJoq/dGosHqGRsPdGzy2VXpPYKwy?= =?utf-8?q?TYqVeNAfA1LnQirmRDDigLTqxzglAnyOz/Xb9K3/4dgrrzHfuHAwFw4Y8zXN0Uu/b?= =?utf-8?q?RRho8nOI8cdadPOLHYeYnPRiYDNBujGoZnVm5X6fg7CXG8HGs539RWyOAG9TaXXah?= =?utf-8?q?4UxPhrkHbF2wacGT/eX95rVF4jSsGqzTr7mG7xjBj2kzW+0dzGMKDh/jYUiAoALTY?= =?utf-8?q?RBHokcpMeQsztHVZSxYYNNZMSFZhgjSIBEYIPmNwp4z+8yvutUyDTeoh81R01dq05?= =?utf-8?q?F7v/iAmah+CT2H9hW9890toiQz08pCCKEtigUCygv/CS/nhZ4Sa3QiwuDCbV8xTO/?= =?utf-8?q?mE4s70ntj+aY1lBzNtZWRwfNYOrHhn4ZRrXSGDyQqr+43VHBhVa1mg2EP4M8QeZ4P?= =?utf-8?q?2SnGwK1BJ?= X-Exchange-RoutingPolicyChecked: Z+dmRnvTZNrzFwub8XsscSBFpbV65yhl3PtPFTG0hzcuHyDO7wIsTg61rMAF9Z7hdTuWcY+x3XmbnOdTSk4j1RllU6p55iv/rl+Y5i2QT/B+wJ/DzSYSVkMLI0QCoT0VQU8MBclEiHk0M00tOVInzSHp16vyycsqvivY6JxGsHJW3SJgcE26YkCdTBCInTlWwTszXYXbxi5ABEZDP3kWMOMBSXW7GOgQlWM+OPo3ycKE8fxRT/f3BreebqLgI/VvDWLLFJZWBbvoU/te/mfrrWOF+jHNlFgRdzJjJ8dkTm6+ZILpCE/PVRef/3rtWF64KXzORPhovIiz0VqOGHgSXQ== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 798762eb-6266-416f-fff6-08deea0010f8 X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB6677.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2026 03:51:54.0615 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a/p4ZnYs6DbRQEDldwGW+3GZdSwNURpT0U/HhOHzIphQn1ZM1fF/qox5cyAlV4ijF8Rs02Qxh4822f4v8BL9LTpWgRtTsBreGQNzdFk4xNpZYL8w7bF0ohiEXjkr0IUA X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4625 X-Authority-Analysis: v=2.4 cv=I/JVgtgg c=1 sm=1 tr=0 ts=6a6432db cx=c_pps a=Y/Y9x3HtMOqQL+YbCjVQEg==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=bi6dqmuHe4P4UrxVR6um:22 a=fTW__CHxibyLmBMfj2wP:22 a=ei4SEBeUAAAA:8 a=t7CeM3EgAAAA:8 a=7CQSdrXTAAAA:8 a=iGHA9ds3AAAA:8 a=8wEic9LhAAAA:8 a=ag1SF4gXAAAA:8 a=Tr0CIQbrg0mKLZOxC6IA:9 a=5O9rwaaqg39D_ep3:21 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=8zIOOLb7Ym0NljyPXbuS:22 a=FdTzh2GWekK77mhwV6Dw:22 a=a-qgeE7W1pNrGK8U0ZQC:22 a=nM-MV4yxpKKO9kiQg6Ot:22 a=M9VCcFR7d36vLOFuqMn8:22 a=Yupwre4RP9_Eg_Bd0iYG:22 X-Proofpoint-GUID: Z0VrN9Q6nMoJugFziM5x7RnXzIG_wvPW X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI1MDAzMiBTYWx0ZWRfX4lanEheZ0s82 Zpdj1bH2xG/tGCNzPGzZ6wyirQb3ZaC5HsXZz2KdNVovjt4ZUPmuPGtjgVWHmIQ8FlmV2IBMEf3 v+VuO+7hX9ET28yMaxJyzsD9huSmHaV381r/CosqDz6FfbDj8vYqPbcVipX2TVMAoIBq3s3Z4YC dIyJVv1HIaoT5q3u04rFQx6+0TOHMCznZ2pJt9EXRFN+Q5TxyGWhi6JjP2UZnvd4keYSb0P8Lqa mczHwJrwfgQDL89uxNgOZFeqi7m5IEvVUInWNBCBY6bjOSP/enjo74QFlnjEjsOoKen/3166lrp V5qFB6SN+5Kb7X38yk5SgBxsRsZ5ar+XgbLyuxP6diOlmer5grPrDBwhwU5uFM9LqRkkQwyRaW+ 2JSTkpFRA9ZmZK2+MLGwm2sPbp4938bkey9YGDsANfc/J8W65La5T28wEwSbdz+r2TDhAM9nx1r z+o6mL/9bgeuuOd/KbA== X-Proofpoint-ORIG-GUID: Z0VrN9Q6nMoJugFziM5x7RnXzIG_wvPW X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI1MDAzMiBTYWx0ZWRfX8lig8e3YEg8M xre8R6aYpe5PucSQu9Rh/VErph+u1GVOODi+7S5XUos6K7SC55YvFcZmQKYQhXjHCabiPSGwR+Y oCkpvtStM79nSxdyNdGnCYUJbfLppH49tueSJyFynPsZoOcpGmaB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-25_01,2026-07-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 impostorscore=0 malwarescore=0 clxscore=1015 phishscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607250032 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0064b401.pphosted.com id 66P3ptcR3192368 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 25 Jul 2026 03:52:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241954 From: Deepesh Varatharajan [YOCTO #15808] Consolidate Rust source management across all Rust recipes (rust, cargo, libstd-rs and their native/nativesdk variants) into a single shared source tree using the work-shared pattern. Disk savings: a world build with multilibs enabled, together with nativesdk-rust and nativesdk-cargo, now shares a single ~4.2 GB rustc-src tree instead of maintaining up to 11 independent copies (~46.2 GB total). Performance (clean core-image-sato build, qemux86-64): Before: 68m53.507s After: 65m46.159s Improvement: 3m07.348s (~4.5%) New files: - rust-source.bb: A shared recipe that fetches, unpacks, and patches the rustc source tree into ${TMPDIR}/work-shared/rust-source-${PV}-${PR}. All build/install/packaging tasks are disabled; this recipe exists solely to provide a single copy of the source. Inherits allarch/nopackages, excludes itself from rm_work, and is hidden from world builds. Also defines RUST_BUILD_ARCH locally since this recipe does not inherit rust-common.bbclass but still needs the mapping for snapshot fetching via rust-snapshot.inc. - common-source.inc: Included by consumer recipes (rust, cargo, libstd-rs) to disable their local do_fetch/do_unpack/do_patch tasks, clear SRC_URI, and add task dependencies on rust-source-${PV} for configure, licensing, and SPDX generation. Also provides is_work_shared_spdx() override for correct SPDX shared-workdir detection. Modified files: - rust-source.inc: - Replace RUST_VERSION with explicit MAJOR_VER/MINOR_VER/PATCH_VER and PV. - Set UNPACKDIR to the work-shared location so all consumers share one source tree via RUSTSRC and S. - rust_git.bb (renamed from rust_1.96.1.bb): - Add 'require common-source.inc' to use the shared source tree. - Set B = ${WORKDIR}/build to separate build artifacts from shared source. - Set CARGO_HOME = ${WORKDIR}/cargo_home to isolate cargo caching. - Set build-dir = "rust-build" in config.toml to distinguish Yocto's build directory (B), which holds config.toml, from the bootstrap's own build output directory. Without this, bootstrap defaults to "build/" inside B, creating an ambiguous build/build/ nesting. - Use absolute ${S}/src/bootstrap/bootstrap.py path since cwd is now B. - Update install functions to reference rust-build/ instead of build/. - Update do_test_compile to use absolute ${S}/src/tools/ path. - Change do_rust_setup_snapshot from 'after do_unpack' to depend on rust-source-${PV}:do_unpack (since local do_unpack is removed). - cargo_git.bb (renamed from cargo_1.96.1.bb): - Add 'require common-source.inc' to use the shared source tree. - Change do_cargo_setup_snapshot from 'after do_unpack' to depend on rust-source-${PV}:do_unpack. - libstd-rs_git.bb (renamed from libstd-rs_1.96.1.bb): - Add 'require common-source.inc' to use the shared source tree. - rust-cross-canadian_git.bb (renamed from rust-cross-canadian_1.96.1.bb): - Rename only (version now comes from rust-source.inc via PV). - rust-common.bbclass: - Add a second --remap-path-prefix for ${TMPDIR}/work-shared so debug info from the shared source tree is correctly remapped. - Retain RUST_BUILD_ARCH definition so that consumer recipes (rust, cargo, libstd-rs) which inherit this class can resolve snapshot directory names used by do_rust_setup_snapshot and do_cargo_setup_snapshot. - lib/oeqa/selftest/cases/rust.py: - Adapt the selftest to the build-dir/source-dir split: use B for build artifacts and RUSTSRC for source paths. - Update remote-test-server copy path from build/ to rust-build/. - Pass --build-dir and --config explicitly to bootstrap.py. - conf/distro/include/maintainers.inc: - Add maintainer entry for the new rust-source recipe. License-Update: recipe file renames only, no license change Signed-off-by: Deepesh Varatharajan --- meta/classes-recipe/rust-common.bbclass | 4 +- meta/conf/distro/include/maintainers.inc | 1 + meta/lib/oeqa/selftest/cases/rust.py | 9 ++- .../rust/{cargo_1.96.1.bb => cargo_git.bb} | 8 ++- meta/recipes-devtools/rust/common-source.inc | 28 ++++++++++ .../{libstd-rs_1.96.1.bb => libstd-rs_git.bb} | 4 ++ ...n_1.96.1.bb => rust-cross-canadian_git.bb} | 0 meta/recipes-devtools/rust/rust-source.bb | 56 +++++++++++++++++++ meta/recipes-devtools/rust/rust-source.inc | 16 +++++- .../rust/{rust_1.96.1.bb => rust_git.bb} | 31 +++++++--- 10 files changed, 140 insertions(+), 17 deletions(-) rename meta/recipes-devtools/rust/{cargo_1.96.1.bb => cargo_git.bb} (91%) create mode 100644 meta/recipes-devtools/rust/common-source.inc rename meta/recipes-devtools/rust/{libstd-rs_1.96.1.bb => libstd-rs_git.bb} (92%) rename meta/recipes-devtools/rust/{rust-cross-canadian_1.96.1.bb => rust-cross-canadian_git.bb} (100%) create mode 100644 meta/recipes-devtools/rust/rust-source.bb rename meta/recipes-devtools/rust/{rust_1.96.1.bb => rust_git.bb} (93%) diff --git a/meta/classes-recipe/rust-common.bbclass b/meta/classes-recipe/rust-common.bbclass index 057aeda67a..6bc42016d1 100644 --- a/meta/classes-recipe/rust-common.bbclass +++ b/meta/classes-recipe/rust-common.bbclass @@ -14,7 +14,9 @@ FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta" FILES:${PN}-dbg += "${rustlibdir}/.debug" RUSTLIB ?= "-L ${STAGING_DIR_HOST}${rustlibdir}" -RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR}" +RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR} \ + --remap-path-prefix=${TMPDIR}/work-shared=${TARGET_DBGSRC_DIR} \ +" RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}" RUSTLIB_DEP ??= "libstd-rs" RUST_PANIC_STRATEGY ??= "unwind" diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index b49386a27d..e18f17fd81 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -783,6 +783,7 @@ RECIPE_MAINTAINER:pn-ruby = "Ross Burton " RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton " RECIPE_MAINTAINER:pn-rust = "Randy MacLeod " RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod " +RECIPE_MAINTAINER:pn-rust-source-1.96.1 = "Deepesh Varatharajan " RECIPE_MAINTAINER:pn-rxvt-unicode = "Unassigned " RECIPE_MAINTAINER:pn-sassc = "Simone Weiß " RECIPE_MAINTAINER:pn-sato-icon-theme = "Richard Purdie " diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index c961a8f652..4111d72044 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py @@ -46,7 +46,8 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): recipe = "rust" start_time = time.time() bitbake("{} -c test_compile".format(recipe)) - builddir = get_bb_var("RUSTSRC", "rust") + builddir = get_bb_var("B", "rust") + sourcedir = get_bb_var("RUSTSRC", "rust") # build core-image-minimal with required packages default_installed_packages = ["libgcc", "libstdc++", "libatomic", "libgomp", "libzstd", "llvm", "openssl"] features = [] @@ -111,7 +112,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): # Copy remote-test-server to image through scp host_sys = get_bb_var("RUST_BUILD_SYS", "rust") ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user="root") - ssh.copy_to(builddir + "/build/" + host_sys + "/stage2-tools-bin/remote-test-server","~/") + ssh.copy_to(builddir + "/rust-build/" + host_sys + "/stage2-tools-bin/remote-test-server","~/") # Execute remote-test-server on image through background ssh command = '~/remote-test-server --bind 0.0.0.0:12345 -v' sshrun=subprocess.Popen(("ssh", '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-f', "root@%s" % qemu.ip, command), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -131,8 +132,10 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): # PowerPC mac99 QEMU has 768MB RAM limit, so we need to minimize test binary sizes cmd = cmd + " export RUSTFLAGS='-C strip=debuginfo -Clink-arg=-lz -Clink-arg=-lzstd';" # Trigger testing. + # Run bootstrap from sourcedir with explicit --build-dir and --config + # pointing to the separate build directory. cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip - cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py test %s --target %s" % (builddir, testargs, targetsys) + cmd = cmd + " cd %s; python3 src/bootstrap/bootstrap.py --build-dir %s/rust-build --config %s/config.toml test %s --target %s" % (sourcedir, builddir, builddir, testargs, targetsys) retval = runCmd(cmd) end_time = time.time() diff --git a/meta/recipes-devtools/rust/cargo_1.96.1.bb b/meta/recipes-devtools/rust/cargo_git.bb similarity index 91% rename from meta/recipes-devtools/rust/cargo_1.96.1.bb rename to meta/recipes-devtools/rust/cargo_git.bb index adc1f0d331..16f8a76310 100644 --- a/meta/recipes-devtools/rust/cargo_1.96.1.bb +++ b/meta/recipes-devtools/rust/cargo_git.bb @@ -13,6 +13,8 @@ LIC_FILES_CHKSUM = " \ require rust-source.inc require rust-snapshot.inc +# Use shared source tree from rust-source.bb; disables local fetch/unpack/patch +require common-source.inc S = "${RUSTSRC}/src/tools/cargo" CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" @@ -21,6 +23,9 @@ CVE_PRODUCT = "rust-lang:cargo" inherit cargo pkgconfig +# Explicit CARGO_HOME avoids cargo caching in the shared source tree +CARGO_HOME = "${WORKDIR}/cargo_home" + DEBUG_PREFIX_MAP += "-ffile-prefix-map=${RUSTSRC}/vendor=${TARGET_DBGSRC_DIR}" do_cargo_setup_snapshot () { @@ -32,9 +37,10 @@ do_cargo_setup_snapshot () { fi } -addtask cargo_setup_snapshot after do_unpack before do_configure +addtask cargo_setup_snapshot before do_configure do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}" do_cargo_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" +do_cargo_setup_snapshot[depends] += "rust-source-${PV}:do_unpack" do_compile:prepend () { export RUSTC_BOOTSTRAP="1" diff --git a/meta/recipes-devtools/rust/common-source.inc b/meta/recipes-devtools/rust/common-source.inc new file mode 100644 index 0000000000..a0d4dc542c --- /dev/null +++ b/meta/recipes-devtools/rust/common-source.inc @@ -0,0 +1,28 @@ +# common-source.inc - Disable source tasks for recipes using shared rust-source +# +# Recipes that include this file rely on rust-source-${PV} for fetching, +# unpacking, and patching the Rust source tree. This avoids duplicating the +# ~4.2 GB rustc-src tree per recipe variant (rust, cargo, libstd-rs and their +# native/nativesdk counterparts). + +# Disable local fetch/unpack/patch since rust-source-${PV} handles them +do_fetch() { + : +} +do_fetch[noexec] = "1" +deltask do_unpack +deltask do_patch + +# Clear SRC_URI to prevent fetcher warnings from stale URIs inherited via .inc +SRC_URI = "" + +# Ensure the shared source is fully ready before dependent tasks run +do_configure[depends] += "rust-source-${PV}:do_patch" +do_populate_lic[depends] += "rust-source-${PV}:do_unpack" +do_create_spdx[depends] += "rust-source-${PV}:do_patch" + +# The SPDX class uses is_work_shared_spdx() to detect shared workdirs. +# Since we redirect S rather than WORKDIR, the default detection fails. +# Override to always return True so SPDX processing works correctly. +def is_work_shared_spdx(d): + return True diff --git a/meta/recipes-devtools/rust/libstd-rs_1.96.1.bb b/meta/recipes-devtools/rust/libstd-rs_git.bb similarity index 92% rename from meta/recipes-devtools/rust/libstd-rs_1.96.1.bb rename to meta/recipes-devtools/rust/libstd-rs_git.bb index 1ecd6bff3f..939e5824b3 100644 --- a/meta/recipes-devtools/rust/libstd-rs_1.96.1.bb +++ b/meta/recipes-devtools/rust/libstd-rs_git.bb @@ -5,6 +5,7 @@ LICENSE = "Unicode-3.0 AND (Apache-2.0 OR MIT)" LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=11a3899825f4376896e438c8c753f8dc" require rust-source.inc +require common-source.inc # The dummy crate named `sysroot` represents the standard library target. # @@ -30,6 +31,9 @@ CARGO_FEATURES ?= "panic-unwind backtrace" CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'" CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor" +# Explicit CARGO_HOME avoids cargo caching in the shared source tree +CARGO_HOME = "${WORKDIR}/cargo_home" + do_compile:prepend () { # For Rust 1.13.0 and newer export RUSTC_BOOTSTRAP="1" diff --git a/meta/recipes-devtools/rust/rust-cross-canadian_1.96.1.bb b/meta/recipes-devtools/rust/rust-cross-canadian_git.bb similarity index 100% rename from meta/recipes-devtools/rust/rust-cross-canadian_1.96.1.bb rename to meta/recipes-devtools/rust/rust-cross-canadian_git.bb diff --git a/meta/recipes-devtools/rust/rust-source.bb b/meta/recipes-devtools/rust/rust-source.bb new file mode 100644 index 0000000000..0afef845fc --- /dev/null +++ b/meta/recipes-devtools/rust/rust-source.bb @@ -0,0 +1,56 @@ +# rust-source.bb - Shared source recipe for the Rust toolchain +# +# This recipe fetches, unpacks, and patches the rustc source tree into a +# work-shared location so that rust, cargo, libstd-rs, and their native/nativesdk +# variants all share a single copy of the source. This eliminates duplication +# (up to 11 copies of the ~4.2 GB source tree in multilib + nativesdk builds) +# and significantly reduces disk usage (~46.2 GB -> ~4.2 GB for rustc-src). +# +# Only do_fetch, do_unpack, and do_patch are meaningful here. All other +# tasks are disabled since this recipe exists solely to provide sources. + +SUMMARY = "Rust sources" +HOMEPAGE = "http://www.rust-lang.org" +SECTION = "devel" +LICENSE = "(Unicode-3.0 AND (Apache-2.0 OR MIT)" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=11a3899825f4376896e438c8c753f8dc" + +# This recipe only provides source; disable build/install/packaging tasks +deltask do_configure +deltask do_compile +deltask do_install +deltask do_populate_sysroot +deltask do_populate_lic + +# Prevent rm_work from removing the shared source tree +RM_WORK_EXCLUDE += "${PN}" + +require rust-source.inc +require rust-snapshot.inc + +inherit allarch nopackages + +PN = "rust-source-${PV}" +BPN = "rust-source" + +# Place WORKDIR under work-shared so all consumers reference the same location +WORKDIR = "${TMPDIR}/work-shared/rust-source-${PV}-${PR}" +SSTATE_SWSPEC = "sstate:rust-source::${PV}:${PR}::${SSTATE_VERSION}:" + +# Use work-shared stamp directory so sstate is shared across all architectures +STAMP = "${STAMPS_DIR}/work-shared/rust-source-${PV}-${PR}" +STAMPCLEAN = "${STAMPS_DIR}/work-shared/rust-source-${PV}-*" + +DEPENDS = "" +PACKAGES = "" +baselib = "lib" +PACKAGE_ARCH = "all" + +B = "${WORKDIR}/build" + +# rust-source.bb does not inherit rust-common.bbclass (it is allarch/nopackages +# and has no toolchain dependencies), so we define RUST_BUILD_ARCH locally for +# snapshot URL resolution in rust-snapshot.inc. +RUST_BUILD_ARCH = "${@{'ppc': 'powerpc', 'ppc64': 'powerpc64', 'ppc64le': 'powerpc64le', 'riscv64': 'riscv64gc'}.get(d.getVar('BUILD_ARCH'), d.getVar('BUILD_ARCH'))}" + +EXCLUDE_FROM_WORLD = "1" diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index 5678e00671..49207a3947 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc @@ -1,6 +1,12 @@ -RUST_VERSION ?= "${@d.getVar('PV').split('-')[0]}" +# Version is split into MAJOR_VER and MINOR_VER for easy bumping and +# to allow consistent use of PV across all consuming recipes. +MAJOR_VER = "1" +MINOR_VER = "96" +PATCH_VER = "1" -SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;name=rust \ +PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" + +SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust \ file://0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch;patchdir=${RUSTSRC} \ file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \ file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \ @@ -13,7 +19,11 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n " SRC_URI[rust.sha256sum] = "77a6ff3003a4ad0cb00697b043c879e3e1a15d945b1a1f63818903bfc3fa8b98" -RUSTSRC = "${UNPACKDIR}/rustc-${RUST_VERSION}-src" +# Point UNPACKDIR into the work-shared location so rust-source.bb and all +# consumers (via S/RUSTSRC) reference a single shared source tree. +UNPACKDIR = "${TMPDIR}/work-shared/rust-source-${PV}-${PR}/sources" +RUSTSRC = "${UNPACKDIR}/rustc-${PV}-src" +S = "${RUSTSRC}" UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html" UPSTREAM_CHECK_REGEX = "rustc-(?P\d+(\.\d+)+)-src" diff --git a/meta/recipes-devtools/rust/rust_1.96.1.bb b/meta/recipes-devtools/rust/rust_git.bb similarity index 93% rename from meta/recipes-devtools/rust/rust_1.96.1.bb rename to meta/recipes-devtools/rust/rust_git.bb index fa8777826f..4bbe4ed0bd 100644 --- a/meta/recipes-devtools/rust/rust_1.96.1.bb +++ b/meta/recipes-devtools/rust/rust_git.bb @@ -4,6 +4,10 @@ SECTION = "devel" LICENSE = "Unicode-3.0 AND (Apache-2.0 OR MIT)" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=11a3899825f4376896e438c8c753f8dc" +require rust-source.inc +require rust-snapshot.inc +require common-source.inc + inherit rust inherit cargo_common @@ -24,6 +28,9 @@ INHIBIT_DEFAULT_RUST_DEPS:class-native = "1" PROVIDES:class-native = "virtual/${TARGET_PREFIX}rust" S = "${RUSTSRC}" +# Separate build directory from the shared source tree so that multiple +# variants (target, native, nativesdk) don't conflict in the source dir. +B = "${WORKDIR}/build" # Use at your own risk, accepted values are stable, beta and nightly RUST_CHANNEL ?= "stable" @@ -38,6 +45,9 @@ RUST_ALTERNATE_EXE_PATH_NATIVE = "${STAGING_BINDIR_NATIVE}/llvm-config" # own vendoring. CARGO_DISABLE_BITBAKE_VENDORING = "1" +# Explicit CARGO_HOME avoids cargo caching in the shared source tree +CARGO_HOME = "${WORKDIR}/cargo_home" + setup_cargo_environment () { # The first step is to build bootstrap and some early stage tools, # these are build for the same target as the snapshot, e.g. @@ -66,11 +76,11 @@ do_rust_setup_snapshot () { done fi } -addtask rust_setup_snapshot after do_unpack before do_configure +addtask rust_setup_snapshot before do_configure addtask do_test_compile after do_configure do_rust_gen_targets do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot" do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" -do_rust_setup_snapshot[depends] += "patchelf-native:do_populate_sysroot" +do_rust_setup_snapshot[depends] += "patchelf-native:do_populate_sysroot rust-source-${PV}:do_unpack" RUSTC_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/rustc" CARGO_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/cargo" @@ -173,6 +183,12 @@ python do_configure() { # nothing about when trying to build some stage0 tools (like fabricate) config.set("build", "build", e(d.getVar("RUST_BUILD_SYS"))) + # Yocto's B (${WORKDIR}/build) is where config.toml lives. Rust's + # bootstrap creates its own build output directory inside B; name it + # "rust-build" to avoid ambiguity with Yocto's build directory and + # prevent a confusing build/build/ nesting. + config.set("build", "build-dir", e("rust-build")) + # [install] config.add_section("install") # ./x.py install doesn't have any notion of "destdir" @@ -223,13 +239,10 @@ rust_runx () { oe_cargo_fix_env - python3 src/bootstrap/bootstrap.py ${@oe.utils.parallel_make_argument(d, '-j %d')} "$@" --verbose + python3 ${S}/src/bootstrap/bootstrap.py ${@oe.utils.parallel_make_argument(d, '-j %d')} "$@" --verbose } rust_runx[vardepsexclude] += "PARALLEL_MAKE" -require rust-source.inc -require rust-snapshot.inc - INSANE_SKIP:${PN}:class-native = "already-stripped" FILES:${PN} += "${libdir}/rustlib" FILES:${PN} += "${libdir}/*.so" @@ -241,7 +254,7 @@ do_compile () { do_test_compile[dirs] = "${B}" do_test_compile () { replace_llvm_config_path - rust_runx build src/tools/remote-test-server --target "${RUST_TARGET_SYS}" + rust_runx build ${S}/src/tools/remote-test-server --target "${RUST_TARGET_SYS}" } ALLOW_EMPTY:${PN} = "1" @@ -282,7 +295,7 @@ rust_do_install:class-nativesdk() { install -d ${D}${bindir} for i in cargo-clippy clippy-driver rustfmt; do - cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} + cp rust-build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i done @@ -322,7 +335,7 @@ rust_do_install:class-target() { install -d ${D}${bindir} for i in ${EXTRA_TOOLS}; do - cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} + cp rust-build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i done From patchwork Sat Jul 25 03:51:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepesh Varatharajan X-Patchwork-Id: 93478 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 1CA44C531D0 for ; Sat, 25 Jul 2026 03:52:03 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.33830.1784951519041113272 for ; Fri, 24 Jul 2026 20:51:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=nnsTaaKA; 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.178.238, mailfrom: prvs=166643924b=deepesh.varatharajan@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66P3j2MI3491337 for ; Sat, 25 Jul 2026 03:51:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS06212021; bh=CutJ9vtcJkpj9ofISBfS8w/EyGR12J4lz4/FaKJ3ouw=; b=nnsTaaKAbEKK 8QHx+9I6qcg5Ofkyhq2OBdXay8fDAAx14mTfgnW/XETfQ6s5c4wh8RU35O/xOxcH el5c4+n8gqf+zlJT9QMcZ+3fBXEq+Qdw7k69ux0IRps8KylyMXKMXDs90LS+9bTK 8TsMyOx3K2WBh6kKJD1zz91fLE4u9htAsL+/ITdxmSCoyf7Cj4eA39oFtZb6TL5P e0v2mutRdRY0qsFpt2AlOm+m431JxyG1P8r4JgVJwqbANcviuHiyE2AfzGwsCY78 TDcqX+plicHxRQzhNF/DxZ7+CKiE/4ipCO3WP1ushlsUBJSsdCWbnNSjr27zACs2 HoWrk1LRQQ== Received: from sj2pr03cu001.outbound.protection.outlook.com (mail-westusazon11012062.outbound.protection.outlook.com [52.101.43.62]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 4fmjnfr3k4-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sat, 25 Jul 2026 03:51:57 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d16zkELmjP2rfpOYNM+20mhRQdILQbLSxJxPivERz/Zsn4us/rRrXwS7U2WnbT/iUGFBEjqmrFuGdMl319Mwk1A2Aj76qOPdyMq5OTxAv/ZFMNNxeG3OLEN7GSI7oYtEnmvw5BJwZRSo7ADssobE3f888FSOnCbNds8VlMP0EOMqYkkMbO3OU66Xbfa87sOGoBqwhTPBQNoTDMwQweCVouUllJuHdy6LvuaDC9973yI1S2b1BsdYlAx4y3mDcwbq+GacRF0nBfvO3ZtnPz8gddeCgp5pC+kQQFUuC+m6fRER1fmM/TAJmrXZe1XW8SH9bxucE942qn5+ZoC6kJuhyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CutJ9vtcJkpj9ofISBfS8w/EyGR12J4lz4/FaKJ3ouw=; b=vNnJRLgSyXHkbtouduAQDAVns7F2mk2YCSFtTmol/0k6VHex6I3F3w70Q3gDViZFgGoBFPnakdjCFPljXUVd4SoXml7ErG/x2eipKaz7z6PuXI/X/m4vP4oXPE8tAPhq72jajzwecbtx/qsZdnVQJVI9O2aWgzqNyS1u0g4BZUJ6cy6SWMmWE/diewuQg3xXUhUoguSMgnXFBvpg54Pj7GHvVXlPJ+0VrGTbrThZLOteKelvO90feuebWcXAiqQxyH+K73aUUEbFQM0V8e74nj2SrT0CLrmfUspEHS0GIM2PJIhNmfJmjGmaw+XNxa8OqpI6DPsS7anO8VayjNCnVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from SN7PR11MB6677.namprd11.prod.outlook.com (2603:10b6:806:26b::6) by DM6PR11MB4625.namprd11.prod.outlook.com (2603:10b6:5:2a8::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.12; Sat, 25 Jul 2026 03:51:56 +0000 Received: from SN7PR11MB6677.namprd11.prod.outlook.com ([fe80::490a:519b:d657:99ab]) by SN7PR11MB6677.namprd11.prod.outlook.com ([fe80::490a:519b:d657:99ab%4]) with mapi id 15.21.0245.012; Sat, 25 Jul 2026 03:51:56 +0000 From: Deepesh.Varatharajan@windriver.com To: openembedded-core@lists.openembedded.org Subject: [PATCH v3 3/3] rust: Move do_update_snapshot to rust-source Date: Fri, 24 Jul 2026 20:51:34 -0700 Message-ID: <20260725035136.1260408-3-Deepesh.Varatharajan@windriver.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260725035136.1260408-1-Deepesh.Varatharajan@windriver.com> References: <20260725035136.1260408-1-Deepesh.Varatharajan@windriver.com> X-ClientProxiedBy: BN9P221CA0026.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::24) To SN7PR11MB6677.namprd11.prod.outlook.com (2603:10b6:806:26b::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR11MB6677:EE_|DM6PR11MB4625:EE_ X-MS-Office365-Filtering-Correlation-Id: e14e5f0f-4630-4e70-aa1d-08deea001221 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|52116014|23010399003|366016|38350700014|6133799003|18002099003|22082099003|11063799006|56012099006|10067099003; X-Microsoft-Antispam-Message-Info: nvCwa5s5g6pJa6pnZusZcZvfqTnEw1GN1yRkL8LN/QnVt8vkD48YIEQ7TwNPI6jsc8EGb7slK78d1JSDfGWVaRPN1scSFTajhNcNVwR6j6blNVEd8Cm5/V9v4TdHwSJ7Aj9m1MpT34T0aAQrNsMC7bRaozPvLk/zT93dYz/77ow5xYZLnXEJGqBkdVqwGZ/KhpFyT0JBkRJbQ6TroZkyvWhOYHby8YfInyuzv09sOlB4LJynmaBuAcSb/ZtueqyHQDyyIJeG+fHfl5Q9L71WKIvaa2KqhDf8tnt06aaItzrfXwF+KgyTTFgFKKXMQ2yE5FWHIYAiX6PIoIMGMQVeOmvVGk8yNmeAOzc3hpzVoDQa3mfpt12/eUujs7DCqzOsXWTpeugJsuBuxf+3oakS8wxe3wtdhs8ERjhSV3+QYSO01hCbNeKEU7UjFOOU+9zwzBL9y3cYQlRQn8BtG0pdF9DvA29XSUM/381GmWTlSM6a2vngEWTwzyTNYGeFNVxqN7A3Y7sUHNC2qJpiMBV3qSisxeNfSfnWL6Jeb2WFkwAEEngGi2tIvpiUyFH0LY/73/hqKHHjuCP8xQrE5oCiYNRJMX3w2G75VBtcP5lhrkZv8qBiDqnSmb3AyzkZrh9QdA3tJARBUM3Y+1KU0cDyDCkRqSVsyW/SlMAl78C5nNRnfnzhB/CTn2dF+KyYzc99EI7FwgOZ0tOeZEDrWqnKFupH0ONiwok8CjNiocMtzN0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB6677.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(52116014)(23010399003)(366016)(38350700014)(6133799003)(18002099003)(22082099003)(11063799006)(56012099006)(10067099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2KDUW1mH6wzO96jL1Q1whHd05lcf1kNKy+0Ro3J6pTWWKpP1qQe0j9kgRb9/NLk2jbC6UR/33I/BVptxmaMLIuS1EruNzGJn/WlZK6eN4fx9+JJ5I8x8W1q7UkwS8oZ5JmWFpstecQqLlrKuGkowZydAb6n3shrn34tkZ+Ar8L6VCVH+KYEMcIjWPDQCfgHwWk2axQWC1Twe28oxx+8QxbP+fQZLD1oI3Vn1OOQvqjRmRxa1EdWtyDX5Xi6bzE4FUUUiKkJU5CyMQLsv7ZRtOFAbBGH1yeb8r3/xRQ6MRJnOvmRp9Rx2PG3wIO4u4FxhczfuBTkuuxsjkrp2R958CN/7H3FLP16Xx3hHaD8N9hzAxJ10N2QbCWIqCYmaT+TcM6Xj80mVw5wPWMZEUlfSg50FBkLr1wKkfCNf5L2vFsLATBFY8KOmap8Of8EcR6W4syN74pau0HF4GvTdHRwfwDHXrW/7Qj2lVnAu/Wh4PlS3mSRCXjKzmIcd0h9/9Q+tSPlMwPQMelFXdy951qyuuoiKV6fYUzJ5UM8NQ9eNNDNmEOB8PwLiJFWGYXcWKZRmdHH5dKLk52ga2YO+3jXaYkB4kKQLvcPScRCcY8o6KB/ZdEQq4cGIqgxdp/V/178Ys5DDDjE/PV0+BojW7k1aJc0xmTDkxafXEVo6rMQdfkKLEyL3Wdn/CO8cSmB7aJi6/XN9PIcBw13O9yhZF0bJd57uIz2+H+P4vnloQT1GWokEEX94Wa4OzOJB062VZtvCSlHj8OxIPjCcrWd1W0vlBIK/QDsDYesmQO7b+qd7Ye77KWiKTrkKRV57TrmexZ/bhUZSYRuUSknaPVy+8HPqbLafF6WiY71IoI+Pw6dXKkLCWof5AW17DJj/yzGP8JbZg0f9l7qIN8AEZxhEaPoIA6jHGgAMxCQEfB6AAtjFOTwZS+2KxX3TI1HMdtz1QEGBjWx4gsOTA6DBcNkOGJQmxg8hvT5+1/Qf+Y9rkgWfQCRhUC6tqa0Jlfx2ExavYsC+VAhBs50u4gxtUTjEbUjlA6XDHC8ptfT7bSMOIBm0RFIgmNDH4GhyW9t7Itm/QsG5U+18UejPbpUkdb/zEHDc0fuThFPROLZgM/hO/F8+UcW9xeoCsfe/4S4wUl+xqcEIawHrAMFb/6Adh5EuJCydkJCVEAncNqrbK63DU6XPh5hGs3ead3+oKd7eGmilFaowVu3JxCzpGUB5XjzW+BDzoZ7VjFD9K1PRXO8UgpwPLj2jgLWzLJ2OnqGq7SWCPjfeNrDhc9eO1xcEI0jBW1kqo2HlpQgPdxh/VgS9qQtmd65w9Rqc9wp1Rci380+1p9ZBlMoLomJ/3Ir4DFzCE3SR+1IL3vhgJA+gE1U9JluNYhEk6/5sbAHWAWGBZCoR8dVJzW/6wxI35o+PfL6/IJ+GNo8yXizUNv0TNSf4T9O7VCJWTq4vs5GhypmI4nRrVphykDbH8GeST0XO+FDjfBOZWPCyc/tYXwV/JCb0IME/PR89G/gLspy/D2pXekar/E72yGxxWilAi+8Xwiy7ltT6AjEfD1tVC7GlUuStiW1d/VlI4Ky2eKw/HLxa3vU10L2c28dGmvn6TQrmoMVc2uF8XOmI5tuHC1VSKU2O+olxiihEYHGJWWxTsSs8ICo/2hZp9xt/9lo/vrsEY+TWhTLfe8FosR2fRlPA14sMlfqiIN9Ire5VknS23OITppPgNYFINu0t1aTLOTb9oMOZwTuZ9K5fp36+xPboXxO/uf/rVIaovJn9oGTGD4K2E/1yigWA X-Exchange-RoutingPolicyChecked: n+7VEdnjYMYLinmQjmDnT8b4YNlJeca63iSooxYVl3/7Bl86AGFsEKDNP1cBwTorEHwcyprXUloQhoz53fFdFzPdGrdaV7Qf+rqdrBUt+X+40rFqqANxfku1a6mKZa3DZktLAorD7GN4CUD/AquwWQ1MDaE1i2GPVgxJ97DrxkFKgzzMRCbxr0ParRNPLkyniNEtMKiEvuLIDGcV2GjyjqQkdcgKMtGjpfYAECsJsnVhali72en16nPzrl5Tr8g/JqJRdAL1nldQvUekBZTr5aRQqXfma/jYksCbtv5WTLm/xqga1+G5com1PpxpVZgHLqo/y5XhPJMJUzK5ND1fxg== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: e14e5f0f-4630-4e70-aa1d-08deea001221 X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB6677.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2026 03:51:55.9877 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tfNypvnslfys1iK1D2XTOuJ2YTZNCTn4ishvacaKcdMtVKGLqSzZ4HVtXqXMiK4vDOSa5AV9zNsuQZHX66MJrQQlqPO6SdM57/r6djxHPMt8FeHUM6Ii8ui6UVropptp X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4625 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI1MDAzMyBTYWx0ZWRfXx7ubQ1JcNhp2 FyDUOY96ES+xu2uJIOBZKl08FRGrzQgRAYThhox32Je8NI1oVgwIl1SUZxGDrwZA2ac8RGJaCWZ Xyr1GR/kZNl0tYF/U7lOXU+ABwIwV/N3y4831XMZn3R2HBYhcKbv X-Proofpoint-ORIG-GUID: cDTj36JidUIFxtctYmcuPBbCHN7Yrgj8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI1MDAzMyBTYWx0ZWRfX7OpfMC8OA9K5 pafRLhDOe7pCKUDgRihFrGcaW2oFKI7LOye34mVhECwDgcMvJbxNbenlLS7bJ5Vj0NXOmJhGsyK mnFVdigm1w2LttPn6e6ofV3YLP74oJR5JxDJ+V6tIe9RwdX9vx1gJ9FX7BzwsjftAmZmcoXknIh pNW4C/z74rtxcx2+85WI8xXiRXflskzsCfQTIdgyOYy9UrCpS/3T25CLQVcTDJL44RfWetgPQzO XvcwQagwGpowQVwc9+foHwzvVYrWLjhIox+gaL2Lm4k7xxVAeY7mGBcsiclf4of7wMyRN1+VuBc bJmxG4/AdGT7qWHgvtyE5I2aGS47ycRxX8Swk+h2Ne1oLlP5kgOVBJDaeTi2q9UV895tVOceSd0 OKu2DeWNbKC94uEKn3KD976IWuOXyzFHAUEFxbmYSpfDJHPP+i6czhDC2tufIOXIH78gMXO9GdQ Zc6FKhVWWgHoByIeHRw== X-Authority-Analysis: v=2.4 cv=MuRiLWae c=1 sm=1 tr=0 ts=6a6432dd cx=c_pps a=qMfGPIaByV4ZnHoTJsbowg==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=z/mQ4Ysz8XfWz/Q5cLBRGdckG28=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=xqWC_Br6kY4A:10 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=bi6dqmuHe4P4UrxVR6um:22 a=klDOsUkWDRETUCZYPvoE:22 a=t7CeM3EgAAAA:8 a=M-5mPBX6iDpf5b3w-P8A:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: cDTj36JidUIFxtctYmcuPBbCHN7Yrgj8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-25_01,2026-07-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 malwarescore=0 phishscore=0 suspectscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607250033 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 25 Jul 2026 03:52:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/241956 From: Deepesh Varatharajan Move do_update_snapshot from rust to rust-source, since rust-source now owns do_fetch/do_unpack/do_patch tasks after the shared source refactoring. Signed-off-by: Deepesh Varatharajan --- meta/recipes-devtools/rust/rust-source.bb | 72 ++++++++++++++++++++++ meta/recipes-devtools/rust/rust_git.bb | 73 ----------------------- 2 files changed, 72 insertions(+), 73 deletions(-) diff --git a/meta/recipes-devtools/rust/rust-source.bb b/meta/recipes-devtools/rust/rust-source.bb index 0afef845fc..4b3c3a6d52 100644 --- a/meta/recipes-devtools/rust/rust-source.bb +++ b/meta/recipes-devtools/rust/rust-source.bb @@ -54,3 +54,75 @@ B = "${WORKDIR}/build" RUST_BUILD_ARCH = "${@{'ppc': 'powerpc', 'ppc64': 'powerpc64', 'ppc64le': 'powerpc64le', 'riscv64': 'riscv64gc'}.get(d.getVar('BUILD_ARCH'), d.getVar('BUILD_ARCH'))}" EXCLUDE_FROM_WORLD = "1" + +addtask do_update_snapshot after do_patch +do_update_snapshot[nostamp] = "1" + +# Run with `bitbake rust-source-${PV} -c update_snapshot` to update `rust-snapshot.inc` +# with the checksums for the rust snapshot associated with this rustc-src tarball. +python do_update_snapshot() { + import json + import re + import sys + + from collections import defaultdict + + key_value_pairs = {} + with open(os.path.join(d.getVar("S"), "src", "stage0")) as f: + for line in f: + # Skip empty lines or comments + if not line.strip() or line.startswith("#"): + continue + # Split the line into key and value using '=' as separator + match = re.match(r'(\S+)\s*=\s*(\S+)', line.strip()) + if match: + key = match.group(1) + value = match.group(2) + key_value_pairs[key] = value + # Extract the required values from key_value_pairs + config_dist_server = key_value_pairs.get('dist_server', '') + compiler_date = key_value_pairs.get('compiler_date', '') + compiler_version = key_value_pairs.get('compiler_version', '') + + src_uri = defaultdict(list) + # Assuming checksums_sha256 is now a key-value pair like: checksum_key = checksum_value + for k, v in key_value_pairs.items(): + # Match the pattern for checksums + if "dist" in k and "tar.xz" in k: + m = re.search(f"dist/{compiler_date}/(?P.*)-{compiler_version}-(?P.*)-unknown-linux-gnu\\.tar\\.xz", k) + if m: + component = m.group('component') + arch = m.group('arch') + src_uri[arch].append(f"SRC_URI[{component}-snapshot-{arch}.sha256sum] = \"{v}\"") + # Create the snapshot string with the extracted values + snapshot = """\ +## This is information on the rust-snapshot (binary) used to build our current release. +## snapshot info is taken from rust/src/stage0 +## Rust is self-hosting and bootstraps itself with a pre-built previous version of itself. +## The exact (previous) version that has been used is specified in the source tarball. +## The version is replicated here. + +SNAPSHOT_VERSION = "%s" + +""" % compiler_version + # Add the checksum components to the snapshot + for arch, components in src_uri.items(): + snapshot += "\n".join(components) + "\n\n" + # Add the additional snapshot URIs + snapshot += """\ +SRC_URI += " \\ + ${RUST_DIST_SERVER}/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \\ + ${RUST_DIST_SERVER}/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \\ + ${RUST_DIST_SERVER}/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \\ +" + +RUST_DIST_SERVER = "%s" + +RUST_STD_SNAPSHOT = "rust-std-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" +RUSTC_SNAPSHOT = "rustc-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" +CARGO_SNAPSHOT = "cargo-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" +""" % config_dist_server + # Write the updated snapshot information to the rust-snapshot.inc file + with open(os.path.join(d.getVar("THISDIR"), "rust-snapshot.inc"), "w") as f: + f.write(snapshot) +} diff --git a/meta/recipes-devtools/rust/rust_git.bb b/meta/recipes-devtools/rust/rust_git.bb index 4bbe4ed0bd..f8f47b0414 100644 --- a/meta/recipes-devtools/rust/rust_git.bb +++ b/meta/recipes-devtools/rust/rust_git.bb @@ -354,79 +354,6 @@ rust_do_install:class-target() { rm ${D}${libdir}/rustlib/${RUST_HOST_SYS}/lib/libstd*.so } -addtask do_update_snapshot after do_patch -do_update_snapshot[nostamp] = "1" - -# Run with `bitbake -c update_snapshot rust` to update `rust-snapshot.inc` -# with the checksums for the rust snapshot associated with this rustc-src -# tarball. -python do_update_snapshot() { - import json - import re - import sys - - from collections import defaultdict - - key_value_pairs = {} - with open(os.path.join(d.getVar("S"), "src", "stage0")) as f: - for line in f: - # Skip empty lines or comments - if not line.strip() or line.startswith("#"): - continue - # Split the line into key and value using '=' as separator - match = re.match(r'(\S+)\s*=\s*(\S+)', line.strip()) - if match: - key = match.group(1) - value = match.group(2) - key_value_pairs[key] = value - # Extract the required values from key_value_pairs - config_dist_server = key_value_pairs.get('dist_server', '') - compiler_date = key_value_pairs.get('compiler_date', '') - compiler_version = key_value_pairs.get('compiler_version', '') - - src_uri = defaultdict(list) - # Assuming checksums_sha256 is now a key-value pair like: checksum_key = checksum_value - for k, v in key_value_pairs.items(): - # Match the pattern for checksums - if "dist" in k and "tar.xz" in k: - m = re.search(f"dist/{compiler_date}/(?P.*)-{compiler_version}-(?P.*)-unknown-linux-gnu\\.tar\\.xz", k) - if m: - component = m.group('component') - arch = m.group('arch') - src_uri[arch].append(f"SRC_URI[{component}-snapshot-{arch}.sha256sum] = \"{v}\"") - # Create the snapshot string with the extracted values - snapshot = """\ -## This is information on the rust-snapshot (binary) used to build our current release. -## snapshot info is taken from rust/src/stage0 -## Rust is self-hosting and bootstraps itself with a pre-built previous version of itself. -## The exact (previous) version that has been used is specified in the source tarball. -## The version is replicated here. - -SNAPSHOT_VERSION = "%s" - -""" % compiler_version - # Add the checksum components to the snapshot - for arch, components in src_uri.items(): - snapshot += "\n".join(components) + "\n\n" - # Add the additional snapshot URIs - snapshot += """\ -SRC_URI += " \\ - ${RUST_DIST_SERVER}/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \\ - ${RUST_DIST_SERVER}/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \\ - ${RUST_DIST_SERVER}/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \\ -" - -RUST_DIST_SERVER = "%s" - -RUST_STD_SNAPSHOT = "rust-std-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" -RUSTC_SNAPSHOT = "rustc-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" -CARGO_SNAPSHOT = "cargo-${SNAPSHOT_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" -""" % config_dist_server - # Write the updated snapshot information to the rust-snapshot.inc file - with open(os.path.join(d.getVar("THISDIR"), "rust-snapshot.inc"), "w") as f: - f.write(snapshot) -} - RUSTLIB_DEP:class-nativesdk = "" # musl builds include libunwind.a