]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-114883: Fix Makefile dependency tree for non-jit builds (GH-114884)
authorZachary Ware <zach@python.org>
Sat, 3 Feb 2024 23:16:03 +0000 (17:16 -0600)
committerGitHub <noreply@github.com>
Sat, 3 Feb 2024 23:16:03 +0000 (23:16 +0000)
Makefile.pre.in
configure
configure.ac

index fff3d3c4914e7a778378ed401777ccdbcb408bae..aad637876ead8090747801f5b75bd2cbfbe39662 100644 (file)
@@ -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:
index 1d41d7ba66470d73bad2c9c330e08ecd92bf2fdf..0375565c29455281b524fef6e1ca444b075d1edc 100755 (executable)
--- a/configure
+++ b/configure
@@ -920,6 +920,7 @@ LLVM_AR
 PROFILE_TASK
 DEF_MAKE_RULE
 DEF_MAKE_ALL_RULE
+JIT_STENCILS_H
 REGEN_JIT_COMMAND
 ABIFLAGS
 LN
@@ -8019,12 +8020,14 @@ then :
 else $as_nop
   as_fn_append CFLAGS_NODIST " -D_Py_JIT"
            REGEN_JIT_COMMAND="\$(PYTHON_FOR_REGEN) \$(srcdir)/Tools/jit/build.py $host"
+           JIT_STENCILS_H="jit_stencils.h"
            if test "x$Py_DEBUG" = xtrue
 then :
   as_fn_append REGEN_JIT_COMMAND " --debug"
 fi
 fi
 
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_experimental_jit" >&5
 printf "%s\n" "$enable_experimental_jit" >&6; }
 
index b29cd028f8f20047b61f13cc60069ea60d744996..e121e893a1d0d9e21de6fbc2915b233393f1ed54 100644 (file)
@@ -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