You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into this issue when including a crate that is of crate_type cdylib, I get a duplicate split compilation unit error. Here is a minimal test case.
Cargo.toml
[package]
name = "dupcomp"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1.12.0", features = ["full"] }
sysinfo = { version = "0.26.7" }
[profile.release]
lto = "thin"opt-level = 2debug-assertions = falsecodegen-units = 16incremental = truesplit-debuginfo = "packed"debug = true
Split debug info on Mac and Windows are also fine for this case. When including the same crate that is of crate_type rlib it also builds fine on linux with split-debuginfo.
It seems the num_cpus crate included in sysinfo is being added by Thorin first and then the same compilation unit is being added again in tokio (verified this by using the Thorin CLI). Updating the sysinfo library to version 0.29 (where it is no longer a cdylib) resolves this issue.
The text was updated successfully, but these errors were encountered:
I'm running into this issue when including a crate that is of crate_type
cdylib
, I get aduplicate split compilation unit
error. Here is a minimal test case.Cargo.toml
main.rs
Split debug info on Mac and Windows are also fine for this case. When including the same crate that is of crate_type
rlib
it also builds fine on linux withsplit-debuginfo
.It seems the
num_cpus
crate included insysinfo
is being added by Thorin first and then the same compilation unit is being added again intokio
(verified this by using the Thorin CLI). Updating thesysinfo
library to version 0.29 (where it is no longer acdylib
) resolves this issue.The text was updated successfully, but these errors were encountered: