mirror of https://github.com/pyodide/pyodide.git
MAINT Improve debug settings in Makefile.envs (#2648)
This commit is contained in:
parent
74a89826ce
commit
951681cfba
5
Makefile
5
Makefile
|
@ -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:
|
||||||
|
|
|
@ -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=\
|
||||||
|
|
Loading…
Reference in New Issue