Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-119538: Add missing build dependencies #125998

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
36 changes: 25 additions & 11 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ MODULE_OBJS= \
Modules/main.o \
Modules/gcmodule.o

IO_H= Modules/_io/_iomodule.h
IO_H= \
Modules/_io/_iomodule.h \
Include/internal/pycore_emscripten_trampoline.h

IO_OBJS= \
Modules/_io/_iomodule.o \
Expand Down Expand Up @@ -692,6 +694,8 @@ LIBHACL_BLAKE2_HEADERS= \
Modules/_hacl/internal/Hacl_Impl_Blake2_Constants.h \
Modules/_hacl/internal/Hacl_Hash_Blake2s_Simd128.h \
Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h \
Modules/_hacl/lib_memzero0.h \
Modules/_hacl/libintvector.h \
$(LIBHACL_HEADERS)

#########################################################################
Expand Down Expand Up @@ -1208,6 +1212,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_dict_state.h \
$(srcdir)/Include/internal/pycore_dtoa.h \
$(srcdir)/Include/internal/pycore_exceptions.h \
$(srcdir)/Include/internal/pycore_emscripten_trampoline.h \
$(srcdir)/Include/internal/pycore_faulthandler.h \
$(srcdir)/Include/internal/pycore_fileutils.h \
$(srcdir)/Include/internal/pycore_floatobject.h \
Expand Down Expand Up @@ -1761,15 +1766,15 @@ Programs/python.o: $(srcdir)/Programs/python.c
Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.h $(PYTHON_HEADERS)
$(CC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c

Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h
Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h $(srcdir)/Modules/_sre/sre_targets.h

Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h
Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h $(srcdir)/Include/internal/pycore_emscripten_trampoline.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all these pycore_emscripten_trampoline.h dependencies? Can you elaborate?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I traced the build of Modules/posixmodule.o and found that Make calls pycore_emscripten_trampoline.h, which I can of course remove.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all the pycore_emscripten_trampoline.h deps; they are only relevant for that particular build config, and we need a better way to do those anyway.


Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule.h

Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h

Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(srcdir)/Modules/posixmodule.h
Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c $(srcdir)/Modules/posixmodule.h $(srcdir)/Include/internal/pycore_emscripten_trampoline.h

Modules/_interpretersmodule.o: $(srcdir)/Modules/_interpretersmodule.c $(srcdir)/Modules/_interpreters_common.h

Expand All @@ -1793,7 +1798,7 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
-DSHLIB_EXT='"$(EXT_SUFFIX)"' \
-o $@ $(srcdir)/Python/dynload_hpux.c

Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h $(srcdir)/Include/internal/pycore_emscripten_trampoline.h
$(CC) -c $(PY_CORE_CFLAGS) \
-DABIFLAGS='"$(ABIFLAGS)"' \
$(MULTIARCH_CPPFLAGS) \
Expand Down Expand Up @@ -1906,6 +1911,7 @@ BYTESTR_DEPS = \
$(srcdir)/Objects/stringlib/ctype.h \
$(srcdir)/Objects/stringlib/fastsearch.h \
$(srcdir)/Objects/stringlib/find.h \
$(srcdir)/Objects/stringlib/find_max_char.h \
$(srcdir)/Objects/stringlib/join.h \
$(srcdir)/Objects/stringlib/partition.h \
$(srcdir)/Objects/stringlib/split.h \
Expand All @@ -1928,22 +1934,25 @@ UNICODE_DEPS = \
$(srcdir)/Objects/stringlib/ucs2lib.h \
$(srcdir)/Objects/stringlib/ucs4lib.h \
$(srcdir)/Objects/stringlib/undef.h \
$(srcdir)/Objects/stringlib/unicode_format.h
$(srcdir)/Objects/stringlib/unicode_format.h \
$(srcdir)/Objects/stringlib/eq.h

Objects/bytes_methods.o: $(srcdir)/Objects/bytes_methods.c $(BYTESTR_DEPS)
Objects/bytesobject.o: $(srcdir)/Objects/bytesobject.c $(BYTESTR_DEPS)
Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c $(BYTESTR_DEPS)

Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c $(UNICODE_DEPS)

Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h
Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h $(srcdir)/Include/internal/pycore_emscripten_trampoline.h
Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h

Objects/obmalloc.o: $(srcdir)/Objects/mimalloc/alloc.c \
$(srcdir)/Objects/mimalloc/alloc-aligned.c \
$(srcdir)/Objects/mimalloc/alloc-posix.c \
$(srcdir)/Objects/mimalloc/arena.c \
$(srcdir)/Objects/mimalloc/alloc-override.c \
$(srcdir)/Objects/mimalloc/bitmap.c \
$(srcdir)/Objects/mimalloc/bitmap.h \
$(srcdir)/Objects/mimalloc/heap.c \
$(srcdir)/Objects/mimalloc/init.c \
$(srcdir)/Objects/mimalloc/options.c \
Expand All @@ -1952,11 +1961,13 @@ Objects/obmalloc.o: $(srcdir)/Objects/mimalloc/alloc.c \
$(srcdir)/Objects/mimalloc/random.c \
$(srcdir)/Objects/mimalloc/segment.c \
$(srcdir)/Objects/mimalloc/segment-map.c \
$(srcdir)/Objects/mimalloc/static.c \
$(srcdir)/Objects/mimalloc/stats.c \
$(srcdir)/Objects/mimalloc/prim/prim.c \
$(srcdir)/Objects/mimalloc/prim/osx/prim.c \
$(srcdir)/Objects/mimalloc/prim/unix/prim.c \
$(srcdir)/Objects/mimalloc/prim/wasi/prim.c
$(srcdir)/Objects/mimalloc/prim/wasi/prim.c \
$(srcdir)/Include/internal/pycore_emscripten_trampoline.h

Objects/mimalloc/page.o: $(srcdir)/Objects/mimalloc/page-queue.c

Expand Down Expand Up @@ -2034,6 +2045,8 @@ Python/compile.o Python/codegen.o Python/assemble.o Python/flowgraph.o Python/in
$(srcdir)/Include/internal/pycore_opcode_utils.h

Python/ceval.o: \
$(srcdir)/Include/internal/pycore_emscripten_signal.h \
$(srcdir)/Include/internal/pycore_emscripten_trampoline.h \
$(srcdir)/Python/ceval_macros.h \
$(srcdir)/Python/condvar.h \
$(srcdir)/Python/generated_cases.c.h \
Expand Down Expand Up @@ -2066,8 +2079,9 @@ Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d
mv [email protected] $@

Python/ceval.o: $(srcdir)/Include/pydtrace.h
Python/gc.o: $(srcdir)/Include/pydtrace.h
Python/import.o: $(srcdir)/Include/pydtrace.h
Python/ceval_gil.o: $(srcdir)/Python/condvar.h
Python/gc.o: $(srcdir)/Include/pydtrace.h $(srcdir)/Include/internal/pycore_emscripten_trampoline.h
Python/import.o: $(srcdir)/Include/pydtrace.h $(srcdir)/Include/internal/pycore_emscripten_trampoline.h $(srcdir)/Include/internal/pycore_magic_number.h

Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
$(DTRACE) $(DFLAGS) -o $@ -G -s $< $(DTRACE_DEPS)
Expand Down
Loading