From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 020B1941D6A for ; Tue, 7 Jan 2025 19:43:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=B2xApy3GwM1RA9NKF2WJ3L6uG85/yagADjnlYSSVscc=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240830; t=1736279006; v=1; x=1736538205; b=fPTd6GYt4sipCU2uu4nvpdzNg4pWqW00LpM4jnqS/qCYTTVlsWZFOZlkvJlCz8ECCgcO5AVU E7327Ylfto4yAzM+Q7rXz5+Md2BnHaGntwulzC3ftChuCwTmWw7DLkqP48KvRIYLIaLTs7XRm8V 82KxpV+33Gbmh4d2L6qBL5PlYb+If6Je8KNoyUCC6zgSNiJYdRIpOGw2DpWt778FCsyh73FxozK 8FmdTyr8930l4ned0icuExNmz6vIzN/xnOwEmHed554IKgwQsLt7u52fiTKqLe2Q523Dklg2E2v mY6KXd6DP9lckWIhivM5aBxeBXaWzQ6q87CNyq4sZPh4w== X-Received: by 127.0.0.2 with SMTP id htDgYY7687511xSLWebZTGhd; Tue, 07 Jan 2025 11:43:25 -0800 X-Received: from CY3PR05CU001.outbound.protection.outlook.com (CY3PR05CU001.outbound.protection.outlook.com [40.93.201.74]) by mx.groups.io with SMTP id smtpd.web10.1339.1736279004700985194 for ; Tue, 07 Jan 2025 11:43:24 -0800 X-Received: from SA6PR21MB4260.namprd21.prod.outlook.com (2603:10b6:806:411::19) by MN2PR21MB1391.namprd21.prod.outlook.com (2603:10b6:208:203::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.2; Tue, 7 Jan 2025 19:43:22 +0000 X-Received: from SA6PR21MB4260.namprd21.prod.outlook.com ([fe80::69f4:85ed:4228:f168]) by SA6PR21MB4260.namprd21.prod.outlook.com ([fe80::69f4:85ed:4228:f168%4]) with mapi id 15.20.8356.002; Tue, 7 Jan 2025 19:43:21 +0000 From: "Joey Vagedes via groups.io" To: "devel@edk2.groups.io" , "leif.lindholm@oss.qualcomm.com" CC: Ajan Zhong , Ard Biesheuvel , "Kinney, Michael D" Subject: Re: [edk2-devel] Expansion of ARCH in .dsc files Thread-Topic: [EXTERNAL] [edk2-devel] Expansion of ARCH in .dsc files Thread-Index: AQHbYTcRXGkNO5UPO0WwnSpkFJUdYbMLtQsg Date: Tue, 7 Jan 2025 19:43:21 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=f97c0bd3-eeec-4453-9943-91a710c8d188;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2025-01-07T19:38:33Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Tag=10, 3, 0, 1; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA6PR21MB4260:EE_|MN2PR21MB1391:EE_ x-ms-office365-filtering-correlation-id: 6c5d28ac-a37e-4987-6de0-08dd2f538aea x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-ant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YmUjgJkaUjB8/MzWk3E/QcbXC53gQGabH5gWEbgF1khU02kU?= =?us-ascii?Q?48QyllruqHVMukV5seadx6rHQUoreKBFgbWT16qJoDkhHnHKoV/VFXRPnJ5c?= =?us-ascii?Q?DuRTTthJASOPUEwo+toEDWtUq4ZD09onc/j23qlcya1vgzXHwrpuaAMYlu7M?= =?us-ascii?Q?4ppYlS5w0cjwQ3IrqMSUJr/mZJCFAzFM5XVXsA5ZetsTDYfH7r21/5b+/dPJ?= =?us-ascii?Q?ezsh3iS2I3X8KwEnuQCGrMv9ibvgz3YWInyce60CWwTl93eHb62EOYBFudM3?= =?us-ascii?Q?dS1PK6NShEnLts7DqTOPm/LkyaIlm7lPkdJ81EXig5qEsL8QxksEh+hBAdvw?= =?us-ascii?Q?NSpYso5aSP3Hjb19iQluySh2ptsOUhwU82Nq3lRTjgF5DehHsqGu40YWTWzX?= =?us-ascii?Q?dgCzAVYGamIWlNK/vGccdl/QXxFeAdaS2yyLzYMwP19QxJxNxucmyJj3M4fr?= =?us-ascii?Q?E7ARJMS+4RGRl7OjhimK56ZBrUMW83T2WmcX74JyjIPwuk0NGv9W36+uykNV?= =?us-ascii?Q?Efh6Sr5iXAyFHXYFmdlCLfRgjtsZU9tKoMwWbc0qPUJ8TUSpdQ=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IXMT9eqT8pDlPK/Omr8CqbLlzi4ngK9ARocvPnxcNwO00HhN9w4uu/tndwD4?= =?us-ascii?Q?fsVR9ci4gYMVhrB6uwzgqvmrL/2RElRNDHsFvpWeA8m6Cqv4BUm/Hud9ZzlR?= =?us-ascii?Q?6/aFWueVAM21OW6Qcbcv6agk03nFxXwwQhlTG6PIdxb0wL0yFYUaH7jzazYu?= =?us-ascii?Q?7VlsfW1/zs+Gy+nSEPrTDAiBvPgPXJLW901mtLAcinXP6FcY0mjRIHrh1QAf?= =?us-ascii?Q?+7FnsPDAwck0yaTyI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vSsPWCke?= =?us-ascii?Q?4CVflk5wmO0UACIF67rqUnsclN5Xl/z3H7eFpLTvC+xAUCsMoj1r0swDNne6?= =?us-ascii?Q?N6xtvfCwcOyNXy/vDhDr1YOJFnbQD8cxj9a1jbSRSObF0T7GkBaZOp8IOIxN?= =?us-ascii?Q?bAZFJ40sLLIw8EBf3cM8WXlB8FeWtu3pSFqP38c6FyaUnKCr3kjB3WMZV8Ac?= =?us-ascii?Q?LIsfxsCjB64COdQgNZrUlvrXedwXQn7Ph/ai7n9jZjsdE+TPdQ0LLqckLqkQ?= =?us-ascii?Q?VcUwZi87eA+syJdXvRd0Z0SzkKE9WXr5/Es/Ea87wZNKy4bj34zBQ3bUnOt6?= =?us-ascii?Q?Uz6IcaRFeBUbTPCNdGK4nF+HuuT9QEPz1cKoVr1iBTwWUayof+Nq0gVPIth/?= =?us-ascii?Q?Qo752DiUkU2eP3Ak7TFvReWLiMg4tl1r11ul?= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA6PR21MB4260.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c5d28ac-a37e-4987-6de0-08dd2f538aea X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2025 19:43:21.5444 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1i7SvKrapoFXTMmFwg35g7oOUD5/oRI0yhKz8PJhRaKxTBy9Pq1HRfrYH998b3AEyVAtCbByAONVxMbBC6PH2X1uwLtjyywE0znzao3Ol8s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR21MB1391 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 07 Jan 2025 11:43:25 -0800 Resent-From: joeyvagedes@microsoft.com Reply-To: devel@edk2.groups.io,joeyvagedes@microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hRtCeTgZLc9QFkBKFvCRLIH1x7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=fPTd6GYt; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Leif, For your awareness, Section 3.4 of the INF specification states that archit= ectural modifiers for the [Defines] section tag are not permitted. So that you can Ctrl+F and to find the exact language, here is a quote: "architectural modifiers for the [Defines] section tag are not permitted" https://tianocore-docs.github.io/edk2-InfSpecification/release-1.27/3_edk_i= i_inf_file_format/34_[defines]_section.html#34-defines-section Thanks, Joey -----Original Message----- From: devel@edk2.groups.io On Behalf Of Leif Lindhol= m via groups.io Sent: Tuesday, January 7, 2025 11:05 AM To: devel@edk2.groups.io Cc: Ajan Zhong ; Ard Biesheuvel ; Kinney, Michael D Subject: [EXTERNAL] [edk2-devel] Expansion of ARCH in .dsc files So... I originally tripped over my misunderstanding of when writi= ng https://github.com/tianocore/edk2/pull/6262 to get around something I wante= d to test in UefiPayloadPkg. Now Ajan has run into at least an adjacent problem when trying to rework https://github.com/tianocore/edk2/pull/6545 based on feedback I among other= s provided. Now, the thing I had misunderstood before is that when build is called with= multiple -a options, the ARCH variable will expand to a space-separated li= st of *all* the specified architectures. A lot of Arm/AArch64 modules assume this variable only ever contains a sing= le architecture. The thing is, I don't think this is clearly documented in the .dsc specific= ation at all. And it is frequently used as a shorthand in there in a form t= hat would only work if build was called with a single -a. Now, this also means that there are nearly no correct users of ARCH in edk2 or edk2-platforms. Because "the list of all architectures being built simultaneously" simply isn't very useful information build-time. There are two correct uses in edk2, in EmulatorPkg.dsc and in U= efiPayloadPkg.dsc, using '!if "IA32" in "$ARCH"', which as far as I can tel= l is the only possible way to use the variable correctly. Slightly amusingly, EmulatorPkg.dsc also contains an incorrect use. I guess the behaviour is a direct result of how the build command is archit= ected. I guess the one question I have is - is this the intended behaviour? Ard: I think we need to update some of our .dsc files... Ajan: one somewhat hacky workaround I can think of to separate the output i= mages is to hardcode the output image name in arch-specific Defines section= s, like so: diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index = 0bd8d85cab03..f07f2b91764e 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -12,12 +12,17 @@ # Defines Section - statements that will be processed to create a Makefile= . # ##########################################################################= ###### +[Defines.ARM] + OUTPUT_DIRECTORY =3D Build/ArmVirtQemu-ARM + +[Defines.AARCH64] + OUTPUT_DIRECTORY =3D Build/ArmVirtQemu-AARCH64 + [Defines] PLATFORM_NAME =3D ArmVirtQemu PLATFORM_GUID =3D 37d7e986-f7e9-45c2-8067-e371421a626c PLATFORM_VERSION =3D 0.1 DSC_SPECIFICATION =3D 0x00010005 - OUTPUT_DIRECTORY =3D Build/ArmVirtQemu-$(ARCH) SUPPORTED_ARCHITECTURES =3D AARCH64|ARM BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT SKUID_IDENTIFIER =3D DEFAULT -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120969): https://edk2.groups.io/g/devel/message/120969 Mute This Topic: https://groups.io/mt/110483263/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-