Skip to content

Commit a84379d

Browse files
committed
Insert -Zbuild-std when building rust packages
Otherwise we are linking a copy of the standard library built with some particular version of emscripten selected by the rust compiler that does not match the version we are using. This can lead to an ABI mismatch. See rust-lang/rust#131467
1 parent fac0109 commit a84379d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pyodide_build/pywasmcross.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ def handle_command_generate_args( # noqa: C901
525525
elif cmd == "strip":
526526
line[0] = "emstrip"
527527
return line
528+
elif cmd == "cargo":
529+
line.insert(1, "-Zbuild-std")
530+
return line
528531
else:
529532
return line
530533

0 commit comments

Comments
 (0)