From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mNqdEr3jUGV8TAEAauVa8A:P1 (envelope-from ) for ; Sun, 12 Nov 2023 15:39:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mNqdEr3jUGV8TAEAauVa8A (envelope-from ) for ; Sun, 12 Nov 2023 15:39:57 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B869642FA for ; Sun, 12 Nov 2023 15:39:57 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=gDICZK0D; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699799997; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=qK1/V69LmjLNxN8/GWQkACOTnKjqI5XU3InSjC/reTk=; b=gTdwheBZBbDOQ7VxG677VhJT25oHJnIKY9Lzr9Vm1NMPKwueK5+a71KTq6KH3ePU+rRzpW c1ZLpqVl9zhGYLMZFRPpZbhS9+NegJGCqaqf2xmUUQooro4WKOywhdzmT8Up1oNWyXLLLc 0CdMhIP8xdfM9EaDi+NTeUEd2CaokrNJdie2ULlzSDqfTRhyziiHNTS3f52AiG/gzLeKUv eiuSUIfGnfdQL456CYruoYLCwbUpCL/jrSzVNo5f4VCreQX5xRDOsV1kiJXiOnlUQ7HFcF zTA4doYYtfVGuZ/Gp7WMfJ54GjLeYaG6OfSKwCtLgdTYJV0A5IooDby7ZSEXGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=gDICZK0D; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699799997; a=rsa-sha256; cv=none; b=CUDCS9vneEyyy2M8W6O6+eW/Sb0RcvWPLqVwfJriKr8lrIiySC+paOjnvUabWXhXY5T0em 1gV4H7Rqxm/qn6GKuBkL5HJR3m/WmEvUuWq01J04JWJ3HyXZXbAntrXeQ70y+UgZVkTiF7 7gbvrHaYCGlVqiiOVGJRVF+dNGkyYX/ok68sTtFOiL8s2El4dYiIZ4JAVgJKLG3LQAcAHV r0j6KhgKtIp9pQJE2CNNrqVP7oegEac3oI68RkbWbk3OhdeeqaKWhRelV1MxUIURM6xPqB shK0CowqlDHd8pslj+LgwGFV3jtBgIGlzt4jSfuJCByUqdcfkbbEPGt04+kZEw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2Bch-0005a5-7p; Sun, 12 Nov 2023 09:39:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2BcR-0005Up-RV for guix-patches@gnu.org; Sun, 12 Nov 2023 09:39:26 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2BcP-0007f8-3I for guix-patches@gnu.org; Sun, 12 Nov 2023 09:39:23 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2Bd4-0007On-1k for guix-patches@gnu.org; Sun, 12 Nov 2023 09:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67075] [PATCH] build: zig-build-system: Add CPU option Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Nov 2023 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67075 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ekaitz Zarraga Cc: 67075@debbugs.gnu.org Received: via spool by 67075-submit@debbugs.gnu.org id=B67075.169979999128420 (code B ref 67075); Sun, 12 Nov 2023 14:40:02 +0000 Received: (at 67075) by debbugs.gnu.org; 12 Nov 2023 14:39:51 +0000 Received: from localhost ([127.0.0.1]:55293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2Bct-0007OK-1b for submit@debbugs.gnu.org; Sun, 12 Nov 2023 09:39:51 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:47337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2Bcq-0007O5-2G for 67075@debbugs.gnu.org; Sun, 12 Nov 2023 09:39:48 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32f70391608so2014949f8f.2 for <67075@debbugs.gnu.org>; Sun, 12 Nov 2023 06:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699799941; x=1700404741; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=qK1/V69LmjLNxN8/GWQkACOTnKjqI5XU3InSjC/reTk=; b=gDICZK0DT0rhHSzCXYXc4CzKNdpt5gTbwwNMisPnSC0ae3vgAAJBUTJB68KGE8Kynv uXo6CfW575PGCkltIerj37V2f6W8KPCS612y15hlJgXfAYCNU17ndnjooXcN2FcxN+/h +k7EVEdxmwisvz6W7JG09nvp0zKAiNn3fe3+jfUkRz1DHWxXn8wIyrQB+md6VvAAd5RY WoFA+KF/9dg0K9hnDPAr1bKEybEWkOzTSllEv4o/1VP35OgTxstP00uHFtKOWV4m3LFL n1mVw/rnkDe4nHcX54BsUAGjMhl8D78ZJFPwhc2A1Y36Q6AxEwoXeTSrKKvYT+8HLi+1 146w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699799941; x=1700404741; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qK1/V69LmjLNxN8/GWQkACOTnKjqI5XU3InSjC/reTk=; b=huUlUSTueRXr/ZDngO8iQsO6bqg9uciKcdLe2y6QzT82T+QFuBxfRqw9Wv9znbVoqt IbgOGb8FR308ekzMFoRJ1gjJ3lRNzZc1Mapm1YQKrInXeBo0xmw3vrxYRnQ6tvOUPPgQ wAr5ZaV8YieyZY6lvfn7YqYjm8rq2FRkp15Taa5F97cq16G5+ByViitu6b53VuksgWXY 9tQ7mXDD7Kia5QJyOPqqzbtCxm2JgkPDUqbxMAA6jVUR6xDNXLKdYGbvq7tEOKiwpM3s DPG86sTmj93Z8tPK3KlRNSGZT9OrJ3Yn20X5AgcL8W9JxN+9hQXkBT4E+6xQvIH6krX0 IodQ== X-Gm-Message-State: AOJu0YziDNctUzbeHbw6v0shoPQXKE9E92m8Oikaq/UKq3Kq9tzb7ugf fkMUezUwv6VONgir3RwuB/I= X-Google-Smtp-Source: AGHT+IGWCvWlvYjZFQbmnkMRxWdGYNlLRO2S007eP8U2clmDEOD6878Ny5YqFKORncCd1n8ikOuO/g== X-Received: by 2002:adf:d1e9:0:b0:32f:8024:64f1 with SMTP id g9-20020adfd1e9000000b0032f802464f1mr4636308wrd.2.1699799940773; Sun, 12 Nov 2023 06:39:00 -0800 (PST) Received: from localhost ([176.12.139.99]) by smtp.gmail.com with ESMTPSA id f13-20020a5d4dcd000000b0032f7c563ffasm3423525wru.36.2023.11.12.06.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 06:39:00 -0800 (PST) Date: Sun, 12 Nov 2023 16:38:58 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Ekaitz Zarraga , 67075@debbugs.gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bdV4JdJO95MOtt47" Content-Disposition: inline In-Reply-To: X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.70 X-Spam-Score: -3.70 X-Migadu-Queue-Id: 1B869642FA X-Migadu-Scanner: mx13.migadu.com X-TUID: quM8sEuhWqwY --bdV4JdJO95MOtt47 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable What are the values that the compiler can take for this flag? Also, this seems like something that can be addressed with the tuning mechanism, so we can run 'guix build foo --tune' and it'll do The Right Thing=E2=84=A2. Alternatively, if we do go this route, you still need to update the documentation. On Sat, Nov 11, 2023 at 01:09:07PM +0000, Ekaitz Zarraga wrote: > From a647a8ee689022cafef4bab05784b32b1c97bee7 Mon Sep 17 00:00:00 2001 > Message-ID: > From: Ekaitz Zarraga > Date: Sat, 11 Nov 2023 14:05:23 +0100 > Subject: [PATCH] build: zig-build-system: Add CPU option >=20 > Zig packages are optimized by default, adding `-Dcpu=3Dbaseline` to the > build command builds them for an standard cpu that should work in every > machine. >=20 > This change sets that by default but also allows users to choose their > cpu by the `#:zig-cpu` argument. >=20 > * guix/build-system/zig.scm (build): add zig-cpu > * guix/build/zig-build-system.scm (zig-build) add zig-cpu >=20 > Change-Id: Ib4b2124179e7b5492e7c77c64e1f8336832032ea > --- > guix/build-system/zig.scm | 2 ++ > guix/build/zig-build-system.scm | 2 ++ > 2 files changed, 4 insertions(+) >=20 > diff --git a/guix/build-system/zig.scm b/guix/build-system/zig.scm > index 16b8a712cc..f90e76104e 100644 > --- a/guix/build-system/zig.scm > +++ b/guix/build-system/zig.scm > @@ -47,6 +47,7 @@ (define* (zig-build name inputs > source > (tests? #t) > (test-target #f) > + (zig-cpu #f) > (zig-build-flags ''()) > (zig-test-flags ''()) > (zig-release-type #f) > @@ -67,6 +68,7 @@ (define* (zig-build name inputs > #:source #+source > #:system #$system > #:test-target #$test-target > + #:zig-cpu #$zig-cpu > #:zig-build-flags #$zig-build-flags > #:zig-test-flags #$zig-test-flags > #:zig-release-type #$zig-release-type > diff --git a/guix/build/zig-build-system.scm b/guix/build/zig-build-syste= m.scm > index d414ebfb17..99a81314d4 100644 > --- a/guix/build/zig-build-system.scm > +++ b/guix/build/zig-build-system.scm > @@ -44,6 +44,7 @@ (define* (set-zig-global-cache-dir #:rest args) > (setenv "ZIG_GLOBAL_CACHE_DIR" global-cache-dir)) > =20 > (define* (build #:key > + zig-cpu > zig-build-flags > zig-release-type ;; "safe", "fast" or "small" empt= y for a > ;; debug build" > @@ -59,6 +60,7 @@ (define* (build #:key > ,@(if zig-release-type > (list (string-append "-Drelease-" zig-release-t= ype)) > '()) > + ,(string-append "-Dcpu=3D" (or zig-cpu "baseline")) > ,@zig-build-flags))) > (format #t "running: ~s~%" call) > (apply invoke call))) >=20 > base-commit: af6105afc67a15a491a0a4fd18a28c9f801a0b94 > --=20 > 2.41.0 >=20 >=20 >=20 >=20 >=20 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --bdV4JdJO95MOtt47 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmVQ44IACgkQQarn3Mo9 g1H87w/+LE72UpunFTnaIl6aUxH1CNZDEUEyhslZhxQO4fRcUDc74irHeMEaRZH7 9uMOjJdYWzrz1YcwmlPt6tlevWSyeYmlnITaxUv8kE95363Pe3tA7vb4fDj+sA7B 3eN1sE1aPJ18DoXBZNHCOiBS6qaHrr0RITqMk0IxeTgZVEfaxziE6ZdhiYKMycHg MkgQqgjHMr+A/5CeY6TKYSqNSWhCFejU417OS41Rw0345zbcRW4R37M3ULgW0Sf4 Mk4XtKSllQOdlW3648J+338M15D8bVkjW+NXlYg9qefglWcWt6bWMgO3SUmhKWku 7yvRglStWGzFIMwUdmemi4+SqDC6/x3fsATWGkhhVZ+flZiA6NUOK2zcDn4pEEup gjBoRY+dikda5FNn2vqVwF8CHkvqfHz8skuPol7Y7FvJjQn30lX/aRZXN4fqFN4H cWXNqMbaqXrnS97RlWzhdwXv+fZXwVmu3rXIFbqLEep62o+C2fyYk1EDYbr2s4B2 HqXHwA6u6lyQCJJxUgcEKhZxrGLYPxV7A0q2GktPsnXO6heRCQ/k2r8Gszyjz1oR GaDUxkA9mKo9DYW/IUjwJCpOJi14ixVkicCZRUddLwG7CeNKSeF0/HF80BIvNrtE Y0o1xieOPfKBykvqwxE17Y4ob5AN8PACCEmMWv4/qkvl/gNXHQk= =x2rU -----END PGP SIGNATURE----- --bdV4JdJO95MOtt47--