mirror of https://github.com/pyodide/pyodide.git
Use -sSIDE_MODULE=2 when compiling rust (#2713)
This commit is contained in:
parent
392908cf68
commit
6868d2e93c
|
@ -156,7 +156,7 @@ export PYO3_CONFIG_FILE=$(PYODIDE_ROOT)/tools/pyo3_config.ini
|
|||
export RUSTFLAGS= \
|
||||
-C relocation-model=pic \
|
||||
-C target-feature=+mutable-globals \
|
||||
-C link-arg=-sSIDE_MODULE=1 \
|
||||
-C link-arg=-sSIDE_MODULE=2 \
|
||||
-C link-arg=-sWASM_BIGINT
|
||||
|
||||
.output_vars:
|
||||
|
|
|
@ -4,9 +4,6 @@ import sys
|
|||
|
||||
|
||||
def update_args(args):
|
||||
# https://github.com/emscripten-core/emscripten/issues/17109
|
||||
args.insert(0, "-Wl,--no-whole-archive")
|
||||
|
||||
# Remove -s ASSERTIONS=1
|
||||
# See https://github.com/rust-lang/rust/pull/97928
|
||||
for i in range(len(args)):
|
||||
|
@ -25,9 +22,6 @@ def update_args(args):
|
|||
# contains symbols that should come from the main module.
|
||||
# https://github.com/emscripten-core/emscripten/issues/17202
|
||||
args.append("-sERROR_ON_UNDEFINED_SYMBOLS=0")
|
||||
# Seems like --no-entry should be implied by SIDE_MODULE but apparently it
|
||||
# isn't?
|
||||
args.append("-Wl,--no-entry")
|
||||
# Without this, the dylink section seems to get deleted which causes trouble
|
||||
# at load time.
|
||||
args.append("-Wl,--no-gc-sections")
|
||||
|
|
Loading…
Reference in New Issue