Commit 87a4efb61f1 for nodejs
commit 87a4efb61f18652726b053d072456a1fde4c470f
Author: Antoine du Hamel <duhamelantoine1995@gmail.com>
Date: Wed Sep 16 10:46:02 2026 +0200
Revert "build: update Makefile to support fat binary"
This reverts commit 1d8c022544d909607e508990e1361a03f3f51236.
PR-URL: https://github.com/nodejs/node/pull/65427
Refs: https://github.com/nodejs/build/issues/4317
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
diff --git a/Makefile b/Makefile
index a1cb9a649d1..f763684d031 100644
--- a/Makefile
+++ b/Makefile
@@ -1173,16 +1173,6 @@ release-only: check-xz ## Prepare Node.js for release.
fi
$(PKG): release-only
-# pkg building is currently only supported on an ARM64 macOS host for
-# ease of compiling fat-binaries for both macOS architectures.
-ifneq ($(OSTYPE),darwin)
- $(warning Invalid OSTYPE)
- $(error OSTYPE should be `darwin` currently is $(OSTYPE))
-endif
-ifneq ($(ARCHTYPE),arm64)
- $(warning Invalid ARCHTYPE)
- $(error ARCHTYPE should be `arm64` currently is $(ARCHTYPE))
-endif
$(RM) -r $(MACOSOUTDIR)
mkdir -p $(MACOSOUTDIR)/installer/productbuild
cat tools/macos-installer/productbuild/distribution.xml.tmpl \
@@ -1203,28 +1193,14 @@ endif
| sed -E "s/\\{npmversion\\}/$(NPMVERSION)/g" \
>$(MACOSOUTDIR)/installer/productbuild/Resources/$$lang/conclusion.html ; \
done
- CC_host="cc -arch x86_64" CXX_host="c++ -arch x86_64" \
- CC_target="cc -arch x86_64" CXX_target="c++ -arch x86_64" \
- CC="cc -arch x86_64" CXX="c++ -arch x86_64" $(PYTHON) ./configure \
- --dest-cpu=x86_64 \
- --tag=$(TAG) \
- --release-urlbase=$(RELEASE_URLBASE) \
- $(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
- arch -x86_64 $(MAKE) install V=$(V) DESTDIR=$(MACOSOUTDIR)/dist/x64/node
- SIGN="$(CODESIGN_CERT)" PKGDIR="$(MACOSOUTDIR)/dist/x64/node/usr/local" sh \
- tools/osx-codesign.sh
$(PYTHON) ./configure \
- --dest-cpu=arm64 \
+ --dest-cpu=$(ARCHTYPE) \
--tag=$(TAG) \
--release-urlbase=$(RELEASE_URLBASE) \
$(CONFIG_FLAGS) $(BUILD_RELEASE_FLAGS)
$(MAKE) install V=$(V) DESTDIR=$(MACOSOUTDIR)/dist/node
SIGN="$(CODESIGN_CERT)" PKGDIR="$(MACOSOUTDIR)/dist/node/usr/local" sh \
tools/osx-codesign.sh
- lipo $(MACOSOUTDIR)/dist/x64/node/usr/local/bin/node \
- $(MACOSOUTDIR)/dist/node/usr/local/bin/node \
- -output $(MACOSOUTDIR)/dist/node/usr/local/bin/node \
- -create
mkdir -p $(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules
mkdir -p $(MACOSOUTDIR)/pkgs
mv $(MACOSOUTDIR)/dist/node/usr/local/lib/node_modules/npm \