Commit 25fd7ce
committed
Add
I ran into the following error while updating quiche a while back:
```
= note: /usr/bin/ld: target/debug/deps/libquiche-aebddac5b5b78042.rlib(quiche-aebddac5b5b78042.quiche.2dd0d882-cgu.7.rcgu.o): in function `new_session':
/home/builder/.cargo/git/checkouts/quiche-3a3206f14f25c564/a0088a9/quiche/src/tls.rs:1010: multiple definition of `new_session'; target/debug/deps/libquiche-7702398d4219d80f.rlib(quiche-7702398d4219d80f.quiche.1f33b6b3-cgu.5.rcgu.o):/home/builder/.cargo/git/checkouts/quiche-3a3206f14f25c564/df3fac0/src/tls.rs:1010: first defined here
```
That's not a particularly helpful error - the issue was that that we had two versions of quiche in
the dependency tree. This changes quiche to tell Cargo that it has `no_mangle` functions, so that
cargo gives an error when resolving dependencies instead of waiting until link time.
I also took the liberty of removing the unnecessary `no_mangle` attribute from `new_session` -
it's only ever used as a function pointer, so it doesn't need to have a well-known name for the linker.links = "quiche" to Cargo.toml1 parent be37a83 commit 25fd7ce
2 files changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
938 | 937 | | |
939 | 938 | | |
940 | 939 | | |
| |||
0 commit comments