Skip to content

Support single arch builds on macOS - #2435

Open
Enzime wants to merge 1 commit into
zerotier:devfrom
Enzime:push-yktvmzlpkktn
Open

Support single arch builds on macOS#2435
Enzime wants to merge 1 commit into
zerotier:devfrom
Enzime:push-yktvmzlpkktn

Conversation

@Enzime

@Enzime Enzime commented Feb 10, 2025

Copy link
Copy Markdown

This is useful for building ZeroTier in Nixpkgs as we only want to build one architecture at once

Comment thread make-mac.mk Outdated
@laduke

laduke commented Feb 10, 2025

Copy link
Copy Markdown
Contributor

I can't test right now but I'll say I sometimes comment out one of the architectures when I'm iterating because it's much faster to compile only one native arch. Would be cool to have if it doesn't break something in our build systems.

@Enzime
Enzime requested a review from Mic92 February 11, 2025 04:04
@Mic92

Mic92 commented Feb 11, 2025

Copy link
Copy Markdown
Contributor

I can't test right now but I'll say I sometimes comment out one of the architectures when I'm iterating because it's much faster to compile only one native arch. Would be cool to have if it doesn't break something in our build systems.

Should be no change in the behavior, however your use case becomes easier by applying make flags.

@CLAassistant

CLAassistant commented Feb 13, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Enzime

Enzime commented Mar 2, 2025

Copy link
Copy Markdown
Author

@laduke any chance you could take a look again at this PR?

@adamierymenko

Copy link
Copy Markdown
Contributor

Looking at this one before a release -- is there a reason this is important? AFAIK multi-arch macOS binaries only load the target arch and the binary is not large.

@laduke

laduke commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

the OP says something about their downstream package system.
local compile times being twice as fast when iterating would be good for me.

@Enzime
Enzime force-pushed the push-yktvmzlpkktn branch from 8f56d48 to 141520b Compare July 15, 2025 01:29
@Enzime

Enzime commented Jul 15, 2025

Copy link
Copy Markdown
Author

I've rebased the code on top of the latest changes

The main benefit for this one is being able to optionally build single architecture builds, this is necessary in Nixpkgs as we only support building one architecture at a time.

Nixpkgs is the package set for Nix the package manager which can build and install ZeroTier on both macOS and Linux

@barracuda156

Copy link
Copy Markdown

It will be really nice not to hardcode archs, but detect those properly, like it is done on Linux. macOS runs on 5 architectures, not 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants