Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Wasm link section conditional on compiler version #75

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Dec 20, 2024

In order to avoid triggering a link error where there didn't used to be one. #74 causes rust-lld errors like this in compilers older than nightly-2024-12-19:

error: linking with `wasm-component-ld` failed: exit status: 1
  |
  = note: "wasm-component-ld" "-flavor" "wasm" "--export" "__main_void" "--export" "cabi_realloc" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--no-demangle" {...} "-l" "c" "-L" ".rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-wasip2/lib/self-contained" "-o" "target/wasm32-wasip2/debug/deps/repro-2c59c9d65bdd9014.wasm" "--gc-sections" "-O0"
  = note: rust-lld: error: target/wasm32-wasip2/debug/deps/repro-2c59c9d65bdd9014.am9l6ff8xuqu3stbvow8o8tiz.rcgu.o: invalid data symbol offset: `_ZN5repro1_6__CTOR17h2780dd13c1356084E` (offset: 4 segment size: 1)
          error: failed to invoke LLD: exit status: 1

@dtolnay dtolnay merged commit 59030c7 into master Dec 20, 2024
18 checks passed
@dtolnay dtolnay deleted the wasm branch December 20, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant