Commit 2fa2746
committed
Fix linking for wasm with crate metadata included
On wasm the crate metadata ends up in a custom section. It is not
possible to refer to create symbols inside a custom section, so
attempting to export it during linking will result in a linker error.
This keeps the target spec flag to deny compiling rust dylibs for wasm,
but may theoretically allow compiling wasm rust dylibs with a custom
target spec. It will help with wasm proc-macros. And in the future we
can try to flip the only-cdylib option to false on wasm.1 parent 942ac9c commit 2fa2746
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1817 | 1817 | | |
1818 | 1818 | | |
1819 | 1819 | | |
1820 | | - | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
1821 | 1827 | | |
1822 | 1828 | | |
1823 | 1829 | | |
| |||
0 commit comments