diff options
author | Ned Deily <nad@python.org> | 2021-05-02 08:48:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 08:48:29 (GMT) |
commit | 0cb33da1cc9cebb9b2d67d446feb1cfd36fe7f55 (patch) | |
tree | bce5eb56ba2ad215b3bf57422b4c08de8f9c3e1e /Makefile.pre.in | |
parent | 91554e4c5ca3c762998296522f854a7166ba84f0 (diff) | |
download | cpython-0cb33da1cc9cebb9b2d67d446feb1cfd36fe7f55.zip cpython-0cb33da1cc9cebb9b2d67d446feb1cfd36fe7f55.tar.gz cpython-0cb33da1cc9cebb9b2d67d446feb1cfd36fe7f55.tar.bz2 |
bpo-44009: Provide "python3.x-intel64" for Apple Silicon Macs (GH-25804)
This allows reliably forcing macOS universal2 framework builds
to run under Rosetta 2 Intel-64 emulation on Apple Silicon Macs
if needed for testing or when universal2 wheels are not yet
available.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 72ccbcf..0836655 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -189,6 +189,9 @@ STRIPFLAG=-s # Flags to lipo to produce a 32-bit-only universal executable LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@ +# Flags to lipo to produce an intel-64-only universal executable +LIPO_INTEL64_FLAGS=@LIPO_INTEL64_FLAGS@ + # Options to enable prebinding (for fast startup prior to Mac OS X 10.3) OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@ @@ -1344,6 +1347,12 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@ -output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \ $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ fi + if test "x$(LIPO_INTEL64_FLAGS)" != "x" ; then \ + rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-intel64$(EXE); \ + lipo $(LIPO_INTEL64_FLAGS) \ + -output $(DESTDIR)$(BINDIR)/python$(VERSION)-intel64$(EXE) \ + $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ + fi bininstall: altbininstall if test ! -d $(DESTDIR)$(LIBPC); then \ @@ -1379,6 +1388,10 @@ bininstall: altbininstall rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \ fi + if test "x$(LIPO_INTEL64_FLAGS)" != "x" ; then \ + rm -f $(DESTDIR)$(BINDIR)/python3-intel64$(EXE); \ + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-intel64$(EXE) python3-intel64$(EXE)) \ + fi # Install the versioned manual page altmaninstall: |