diff --git a/config b/config index 9a6ac0e..90efd1e 100644 --- a/config +++ b/config @@ -37,20 +37,6 @@ export HPIP="${HPY} -mpip" export CPOPTS="-Os -g0 -fPIC" -if [ -f ${ROOT}/dev ] -then - export COPTS="-fPIC" - export QUIET="" -else - export COPTS="-fPIC" - if ${VERBOSE:-false} - then - export QUIET="" - else - export QUIET="2>&1 > $PYTHONPYCACHEPREFIX/.log" - fi -fi - # base wasm features pure is "mvp" , "bi" is bigint if [ -f /mvp ] diff --git a/emsdk-cc b/emsdk-cc index fcb9c75..6a51e0d 100644 --- a/emsdk-cc +++ b/emsdk-cc @@ -122,8 +122,8 @@ else: # try to keep 32 but maybe with 64 iface (bigint) WASM_EXTRA = env("WASM_EXTRA", "") + " " + env("WASM_OPTS", "") -COPTS = env("COPTS", "-O1") - +# the only sane default for now +COPTS = env("COPTS", "-O2 -g3") MAIN_MODULE = LINKING = STATIC = False @@ -145,6 +145,9 @@ out = [] # fix rust calling for argc, arg in enumerate(sys.argv): + + # clean up rustc way of passing args. + if arg in ("-l", "-L", "-I"): sys.argv[argc] += sys.argv[argc + 1] sys.argv[argc + 1] = "" @@ -176,6 +179,13 @@ for argc, arg in enumerate(sys.argv): SKIP = True break + # THEY ARE NOT SAFE TO CHANGE ! + if arg in ("-O0", "-O1", "-O2", "-O3", "-Os", "-Oz"): + continue + if arg in ("-g0", "-g1", "-g2", "-g3", "-g4"): + continue + + if not MAIN_MODULE: # https://github.com/emscripten-core/emscripten/issues/22742 # https://github.com/hoodmane/emscripten/commit/34144634026c91a73bd3e1db85627132d3a37a6d @@ -199,13 +209,6 @@ for argc, arg in enumerate(sys.argv): if MVP: continue - if arg in ("-O0", "-O1", "-O2", "-O3", "-Os", "-Oz"): - continue - - # keep g3 - if arg in ("-g0", "-g1", "-g2", "-g4"): - continue - # FAILSAFE # that is for some very bad known setup.py behaviour regarding cross compiling and some old codebases. # should not be needed ..