Skip to content

Commit

Permalink
pythongh-114883: Fix Makefile dependency tree for non-jit builds (pyt…
Browse files Browse the repository at this point in the history
  • Loading branch information
zware authored and fsc-eriker committed Feb 14, 2024
1 parent edbb4b8 commit e2cd817
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,18 @@ config.status: $(srcdir)/configure
Python/asm_trampoline.o: $(srcdir)/Python/asm_trampoline.S
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $<

Python/jit.o: regen-jit

JIT_DEPS = \
$(srcdir)/Tools/jit/*.c \
$(srcdir)/Tools/jit/*.py \
$(srcdir)/Python/executor_cases.c.h \
pyconfig.h

jit_stencils.h: $(JIT_DEPS)
@REGEN_JIT_COMMAND@

Python/jit.o: $(srcdir)/Python/jit.c @JIT_STENCILS_H@
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $<

.PHONY: regen-jit
regen-jit:
Expand Down
3 changes: 3 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1592,11 +1592,13 @@ AS_VAR_IF([enable_experimental_jit],
[AS_VAR_APPEND([CFLAGS_NODIST], [" -D_Py_JIT"])
AS_VAR_SET([REGEN_JIT_COMMAND],
["\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py $host"])
AS_VAR_SET([JIT_STENCILS_H], ["jit_stencils.h"])
AS_VAR_IF([Py_DEBUG],
[true],
[AS_VAR_APPEND([REGEN_JIT_COMMAND], [" --debug"])],
[])])
AC_SUBST([REGEN_JIT_COMMAND])
AC_SUBST([JIT_STENCILS_H])
AC_MSG_RESULT([$enable_experimental_jit])

# Enable optimization flags
Expand Down

0 comments on commit e2cd817

Please sign in to comment.