MAINT Improve debug settings in Makefile.envs (#2648)

This commit is contained in:
Hood Chatham 2022-05-30 17:16:55 -07:00 committed by GitHub
parent 74a89826ce
commit 951681cfba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -50,6 +50,11 @@ dist/pyodide.asm.js: \
[ -d dist ] || mkdir dist [ -d dist ] || mkdir dist
$(CXX) -o dist/pyodide.asm.js $(filter %.o,$^) \ $(CXX) -o dist/pyodide.asm.js $(filter %.o,$^) \
$(MAIN_MODULE_LDFLAGS) $(MAIN_MODULE_LDFLAGS)
if [[ -n $${PYODIDE_SOURCEMAP+x} ]] || [[ -n $${PYODIDE_SYMBOLS+x} ]]; then \
cd dist && npx prettier -w pyodide.asm.js ; \
fi
# Strip out C++ symbols which all start __Z. # Strip out C++ symbols which all start __Z.
# There are 4821 of these and they have VERY VERY long names. # There are 4821 of these and they have VERY VERY long names.
# To show some stats on the symbols you can use the following: # To show some stats on the symbols you can use the following:

View File

@ -55,12 +55,21 @@ export DBG_LDFLAGS_SOURCEMAPDEBUG=-gseparate-dwarf
export DBGFLAGS=$(DBGFLAGS_NODEBUG) export DBGFLAGS=$(DBGFLAGS_NODEBUG)
# Include debug symbols but no source maps (most useful) ifdef PYODIDE_SOURCEMAP
#export DBGFLAGS=$(DBGFLAGS_WASMDEBUG) # Debug with source maps (less useful than WASMDEBUG but easier if it helps)
export DBGFLAGS=$(DBGFLAGS_SOURCEMAPDEBUG)
export DBG_LDFLAGS=$(DBG_LDFLAGS_SOURCEMAPDEBUG)
else
ifdef PYODIDE_SYMBOLS
# Include debug symbols but no source maps (most useful)
export DBGFLAGS=$(DBGFLAGS_WASMDEBUG)
endif
endif
ifdef PYODIDE_ASSERTIONS
EXTRA_CFLAGS+=" -DDEBUG_F"
endif
# Debug with source maps (less useful than WASMDEBUG but easier if it helps)
#export DBGFLAGS=$(DBGFLAGS_SOURCEMAPDEBUG)
#export DBG_LDFLAGS=$(DBG_LDFLAGS_SOURCEMAPDEBUG)
export OPTFLAGS=-O2 export OPTFLAGS=-O2
export CFLAGS_BASE=\ export CFLAGS_BASE=\