Skip to content

Commit 78a9a8f

Browse files
committed
gh-153285: Preserve LTO target names on macOS
1 parent c22e9c9 commit 78a9a8f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ PY_CORE_CFLAGS= $(PY_STDMODULE_CFLAGS) -DPy_BUILD_CORE
127127
# LDFLAGS used to build executables and shared targets.
128128
PY_CORE_LDFLAGS=$(PY_LDFLAGS) $(PY_LDFLAGS_NODIST)
129129
CONFIGURE_EXE_LDFLAGS=@EXE_LDFLAGS@
130-
PY_CORE_EXE_LDFLAGS:= $(if $(CONFIGURE_EXE_LDFLAGS), $(CONFIGURE_EXE_LDFLAGS) $(PY_LDFLAGS_NODIST), $(PY_CORE_LDFLAGS))
130+
PY_CORE_EXE_LDFLAGS= $(if $(CONFIGURE_EXE_LDFLAGS), $(CONFIGURE_EXE_LDFLAGS) $(PY_LDFLAGS_NODIST), $(PY_CORE_LDFLAGS))
131131
# Strict or non-strict aliasing flags used to compile dtoa.c, see above
132132
CFLAGS_ALIASING=@CFLAGS_ALIASING@
133133
# Compilation flags only for ceval.c.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix a build failure with ``--with-lto`` on macOS where executable linker
2+
flags expanded Make's ``$@`` before the target was known.

0 commit comments

Comments
 (0)