From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A786346777 for ; Fri, 3 Jul 2026 05:15:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783055741; cv=none; b=QsmeAyGS44GySVZcYMB+m8wcTDWFCcLP6lZvmzz+lg5UFecQKzPj1nq8rSvY3sXojlzqlswUhmi2mVy3cyFt+oZAJCj2jfbsM5ZvKHdlHniR+etgfMuRAjoOU7ehgL/dWGya9s3UMsFcBah4w5lfEoop0F0H6gw30EG148iZfi8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783055741; c=relaxed/simple; bh=VyRtRSPsE0uS/rCuelZwune74MQba1AeElDRBGwps38=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o2jTx4qqNmMALk7kVxIRfsBfYAmWBLUmcZKLnVScOwUi7zzlCKmV7VH7yTnqlK7lgYGuFjlKn92UPaWycPLAQ5SOAFPz8wK3LeBnti4XnynDjFt07NSvowEI7gZDSchG+NP+owuiJUS8XUgF1FLO57OAyaUrzPvhitbbdtkdrNk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=UEKUb1mH; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=nx/tvsOa; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="UEKUb1mH"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="nx/tvsOa" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 3F3627A0109; Fri, 3 Jul 2026 01:15:30 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 03 Jul 2026 01:15:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1783055730; x=1783142130; bh=xwQaLSprqJ LbrbGgx5/sAJ4HSeB6w4QHNvg88yWF998=; b=UEKUb1mHgS4PMLVDpz4NPo8jGd uQpakdqdbjJtRQDsH6nert7ilpPnBt55wdcvI8tVoJdX8HOsUeaihWRx8VCGhIe7 HATB18LGH8jRscJADQCDvKmPSxU2JBrySxSH9BtYLwyRSi7vfIQlWBqpB19yDqCa P/ONXvwaGlJaYLqzWtUoiYcFgDPyGVuA0pCVzhJU8G1YH6KY7VWgkUsVPnR++VJQ xgE8wX2GYhqra2xnXYyJWRYHChTNdQbigrmEu0A3BUXsr8zKk5KZuy56WRR/4heO 5ZG/ktCA7RiPOD9cshD8Rf0oYBFgf1LJbPKHI0rE0L9dNPqSvRE8bLRLgIDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1783055730; x=1783142130; bh=xwQaLSprqJLbrbGgx5/sAJ4HSe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6iFjzzt56Jw2g X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Jul 2026 01:15:28 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 567c59aa (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 3 Jul 2026 05:15:25 +0000 (UTC) Date: Fri, 3 Jul 2026 07:15:22 +0200 From: Patrick Steinhardt To: Shardul Natu Cc: Shardul Natu via GitGitGadget , git@vger.kernel.org, Kristoffer Haugsbakk , Shnatu , Koji Nakamaru Subject: Re: [PATCH v2] Makefile: link osxkeychain & support universal Rust Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jul 02, 2026 at 03:30:15PM -0700, Shardul Natu wrote: > > Can we assume lipo to be generally available on macOS? Also, is it > > sufficient to just do this for the library? I would have expected that > > binaries would also need some treatment there. > > > > In other words: what does it help us to have the Rust treated this way > > if the rest isn't? > > Yes, "lipo" is part of the Apple Xcode CLT, which > is already a hard prerequisite for invoking clang or make on macOS. > The reason only Rust needs special treatment in the Makefile is due to > how the respective toolchains handle multi-architecture builds: > 1. Apple's C toolchain (clang) natively supports universal builds via > CFLAGS and LDFLAGS. When "-arch x86_64 -arch arm64" is passed, clang > automatically compiles and links universal binaries for all C object > files and executables out of the box. > 2. Cargo and rustc, however, do not support multiple "-arch" flags or > emitting universal binaries in a single invocation. Instead, Cargo must > be invoked separately for each target triple ("--target x86_64-apple-darwin" > and "--target aarch64-apple-darwin"). > > By using "lipo" to combine those target-specific Rust static libraries > into a single universal archive at "target/release/libgitcore.a", we > bridge this gap. Once $(RUST_LIB) is a universal archive, the standard C > linker seamlessly links it with the C object files to produce the final > universal Git executables. Okay, that makes sense. This information should definitely be part of the commit message to give reviewers a bit more context. Thanks! Patrick