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 wOMxAlN9T2Vj0QAAauVa8A:P1 (envelope-from ) for ; Sat, 11 Nov 2023 14:10:43 +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 wOMxAlN9T2Vj0QAAauVa8A (envelope-from ) for ; Sat, 11 Nov 2023 14:10:43 +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 AF9AD5A001 for ; Sat, 11 Nov 2023 14:10:42 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elenq.tech header.s=protonmail2 header.b=ehIletj2; 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=fail reason="SPF not aligned (relaxed)" header.from=elenq.tech (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699708242; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2ss1UVI/muZ7yUSSuA6don2f6qvrj4hYNkFZEEx1hHA=; b=ARZor/nFDzuARmf5XWH5vMg0B+CcWLZGlhHG+TRYaMCXw+5H5LbKYmfWrk7nSSo6ErFlSG Olo2Kj5Uh76bsSkbuwROzsEsNnfJvrIwceVzm/hCyZ/9TD08Sdm7JXnSVBZiIQsTB3RxYs KkfEZtPPYI8ahll9GFooNcpN/MNaoI6Fo9pE3a3bK8dMDcbsR6T5HZFAmU5tfOyW5jp2dX USG9l2m3hLM7hZTjpYv37+EqFVGBLvkPRKER6jLroC1LahfzFWKH98+Lmdcbc1AVoTUrag NJTjk7atg/wfzH1T5Icy8h6COajLa+8r1GaxxrC6iX3rO7aw/DxUUnV9/zc5gA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elenq.tech header.s=protonmail2 header.b=ehIletj2; 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=fail reason="SPF not aligned (relaxed)" header.from=elenq.tech (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699708242; a=rsa-sha256; cv=none; b=bwVGcVpsnK0PxNuRhKv9Kb1mvjzjv0DGlZc96SC8JFKeRnsEbIyS8melB3IOWaDFMFypxe nYEuc08mWlzpz2Fr7cZ9sxFdiWPjHZDzRVp8eQIp0zMuHneGw4EpHaet2GdHWokb2Q7VTl Y7apVq5gXf+ud7J7KeqmbVR3Iqh3Ds6TQaIrEDkeAU5f/sLHy2+1h0nQ+oKzBIdkklhrXu QBldH0zHlQWzcHtEJZ8iamFADABmoIdYw94PBmFK9I90DrvhMENYnLpsNkCNDeKBq25hG5 A/KXBFao0FzoH0QIT48RziBFU5Gvmrrl6szkQ200g7EcMfg8s8oHw3x0lFB3pA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1nkn-0000vZ-9B; Sat, 11 Nov 2023 08:10:26 -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 1r1nkk-0000vI-SU for guix-patches@gnu.org; Sat, 11 Nov 2023 08:10:22 -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 1r1nkk-0007pt-K0 for guix-patches@gnu.org; Sat, 11 Nov 2023 08:10:22 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1nlO-0005rd-FF for guix-patches@gnu.org; Sat, 11 Nov 2023 08:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67075] [PATCH] build: zig-build-system: Add CPU option Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Nov 2023 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67075 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67075@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.169970821022473 (code B ref -1); Sat, 11 Nov 2023 13:11:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Nov 2023 13:10:10 +0000 Received: from localhost ([127.0.0.1]:52312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1nkY-0005qO-5B for submit@debbugs.gnu.org; Sat, 11 Nov 2023 08:10:10 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1nkW-0005qA-3N for submit@debbugs.gnu.org; Sat, 11 Nov 2023 08:10:08 -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 1r1njm-0000aR-8v for guix-patches@gnu.org; Sat, 11 Nov 2023 08:09:22 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1nji-00078i-RB for guix-patches@gnu.org; Sat, 11 Nov 2023 08:09:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail2; t=1699708154; x=1699967354; bh=2ss1UVI/muZ7yUSSuA6don2f6qvrj4hYNkFZEEx1hHA=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=ehIletj2oy1UbKepxFfxRaC/q6Ei/HNuDTxCkzF+EkcjQZhFCChKjL3DRb6H3o3f1 QSUCwoMSgkdKhgzL4uVvQZurQGdpSVgRRMHS9k9nlOS9SZ/XbKmxR9YC0XxvxxLPtf 08xXS2SUidHjky1gWFj3Gr/BMKPsW17VCGA0bsIegsCl7UlNthF26mWpPBu3k6BM4E CYLoBujdODaSp7GVYyBzMqnQi/7p7q5hTB1Ka42s8FoBmhEZAmwif8VUORwc440m/G nGtwXYNg301l+lnfvsscYdFY4w36tdvaMK8EDliV93VUczNJOaK1yJjrZs9zP08gdU i7l1nhM32aGuQ== Date: Sat, 11 Nov 2023 13:09:07 +0000 From: Ekaitz Zarraga Message-ID: Feedback-ID: 3263582:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.23; envelope-from=ekaitz@elenq.tech; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: 2.89 X-Spam-Score: 2.89 X-Migadu-Queue-Id: AF9AD5A001 X-Migadu-Scanner: mx13.migadu.com X-TUID: HeEY87LOjzFy >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 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. This change sets that by default but also allows users to choose their cpu by the `#:zig-cpu` argument. * guix/build-system/zig.scm (build): add zig-cpu * guix/build/zig-build-system.scm (zig-build) add zig-cpu Change-Id: Ib4b2124179e7b5492e7c77c64e1f8336832032ea --- guix/build-system/zig.scm | 2 ++ guix/build/zig-build-system.scm | 2 ++ 2 files changed, 4 insertions(+) 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-system.= 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" empty = for a ;; debug build" @@ -59,6 +60,7 @@ (define* (build #:key ,@(if zig-release-type (list (string-append "-Drelease-" zig-release-typ= e)) '()) + ,(string-append "-Dcpu=3D" (or zig-cpu "baseline")) ,@zig-build-flags))) (format #t "running: ~s~%" call) (apply invoke call))) base-commit: af6105afc67a15a491a0a4fd18a28c9f801a0b94 --=20 2.41.0