Skip to content

Commit e93fbb8

Browse files
committed
gh-95973: Add a new --with-dsymutil option to link debug information in MacOS
Signed-off-by: Pablo Galindo <[email protected]>
1 parent 4a7f5a5 commit e93fbb8

File tree

6 files changed

+10838
-7674
lines changed

6 files changed

+10838
-7674
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.cover
66
*.iml
77
*.o
8+
*.lto
89
*.a
910
*.so
1011
*.so.*

Makefile.pre.in

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ DTRACE= @DTRACE@
5454
DFLAGS= @DFLAGS@
5555
DTRACE_HEADERS= @DTRACE_HEADERS@
5656
DTRACE_OBJS= @DTRACE_OBJS@
57+
DSYMUTIL= @DSYMUTIL@
58+
DSYMUTIL_PATH= @DSYMUTIL_PATH@
5759

5860
GNULD= @GNULD@
5961

@@ -575,7 +577,7 @@ LIBEXPAT_HEADERS= \
575577
# Default target
576578
all: @DEF_MAKE_ALL_RULE@
577579
build_all: check-clean-src $(BUILDPYTHON) platform sharedmods \
578-
gdbhooks Programs/_testembed scripts checksharedmods
580+
gdbhooks Programs/_testembed scripts checksharedmods rundsymutil
579581
build_wasm: check-clean-src $(BUILDPYTHON) platform sharedmods \
580582
python-config checksharedmods
581583

@@ -893,6 +895,16 @@ sharedmods: $(SHAREDMODS) pybuilddir.txt
893895
checksharedmods: sharedmods $(PYTHON_FOR_BUILD_DEPS) $(BUILDPYTHON)
894896
@$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/check_extension_modules.py
895897

898+
rundsymutil: sharedmods $(PYTHON_FOR_BUILD_DEPS) $(BUILDPYTHON)
899+
@if [ ! -z $(DSYMUTIL) ] ; then \
900+
$(DSYMUTIL_PATH) $(BUILDPYTHON); \
901+
for mod in X $(SHAREDMODS); do \
902+
if test $$mod != X; then \
903+
$(DSYMUTIL_PATH) $$mod; \
904+
fi; \
905+
done \
906+
fi
907+
896908
Modules/Setup.local:
897909
@# Create empty Setup.local when file was deleted by user
898910
echo "# Edit this file for local setup changes" > $@
@@ -2497,7 +2509,7 @@ Python/thread.o: @THREADHEADERS@ $(srcdir)/Python/condvar.h
24972509

24982510
# Declare targets that aren't real files
24992511
.PHONY: all build_all build_wasm check-clean-src
2500-
.PHONY: sharedmods checksharedmods test quicktest
2512+
.PHONY: sharedmods checksharedmods test quicktest rundsymutil
25012513
.PHONY: install altinstall sharedinstall bininstall altbininstall
25022514
.PHONY: maninstall libinstall inclinstall libainstall
25032515
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure

aclocal.m4

Lines changed: 12 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)