diff --git a/Makefile.envs b/Makefile.envs index 5f34a5869..d5ff44a6d 100644 --- a/Makefile.envs +++ b/Makefile.envs @@ -149,14 +149,15 @@ export STDLIB_MODULE_CFLAGS= $(SIDE_MODULE_CFLAGS) -I Include/ -I . # For RUST export CARGO_HOME ?= $(HOME)/.cargo export CARGO_BUILD_TARGET=wasm32-unknown-emscripten -export CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_LINKER=$(PYODIDE_ROOT)/tools/rust_emcc_wrapper.py +export CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_LINKER=emcc export PYO3_CONFIG_FILE=$(PYODIDE_ROOT)/tools/pyo3_config.ini # idealy we could automatically include all SIDE_MODULE_LDFLAGS here export RUSTFLAGS= \ -C relocation-model=pic \ -C link-arg=-sSIDE_MODULE=2 \ - -C link-arg=-sWASM_BIGINT + -C link-arg=-sWASM_BIGINT \ + -Z link-native-libraries=no .output_vars: set diff --git a/pyodide-build/pyodide_build/buildpkg.py b/pyodide-build/pyodide_build/buildpkg.py index 364bb4602..bcdaa17b5 100755 --- a/pyodide-build/pyodide_build/buildpkg.py +++ b/pyodide-build/pyodide_build/buildpkg.py @@ -152,7 +152,6 @@ def get_bash_runner(): "WASM_PKG_CONFIG_PATH", "CARGO_BUILD_TARGET", "CARGO_HOME", - "CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_LINKER", "RUSTFLAGS", "PYO3_CONFIG_FILE", ] diff --git a/tools/rust_emcc_wrapper.py b/tools/rust_emcc_wrapper.py deleted file mode 100755 index 86969af51..000000000 --- a/tools/rust_emcc_wrapper.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python3 -import subprocess -import sys - - -def update_args(args): - # remove -lc. Not sure if it makes a difference but -lc doesn't belong here. - # https://github.com/emscripten-core/emscripten/issues/17191 - for i in reversed(range(len(args))): - if args[i] == "c" and args[i - 1] == "-l": - del args[i - 1 : i + 1] - - return args - - -def main(args): - args = update_args(args) - return subprocess.call(["emcc"] + args) - - -if __name__ == "__main__": - args = sys.argv[1:] - sys.exit(main(args))