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
Right now, since we're linking with the C compiler (#11937) we're giving all Rust code access to libc. I think the compiler itself should not force linking to libc (and anything else cc links us to by default). Instead either std or the potential libc crate (#11828) should be responsible for the libc link.
The text was updated successfully, but these errors were encountered:
I don't think we want a libc crate/module in the long-term. It should come from libclang so it works on more than the hard-wired glibc ABI, etc. Since code gets inlined, I think we do have to link everything to the libraries we use. Passing --as-needed to the linker will strip any unnecessary dependencies.
Closed by #12205, with -nodefaultlibs gcc will not specify any libraries by default, we have to supply all of them. We now have #[link(name = "c")] for linux required in libstd.
Right now, since we're linking with the C compiler (#11937) we're giving all Rust code access to libc. I think the compiler itself should not force linking to libc (and anything else
cc
links us to by default). Instead eitherstd
or the potentiallibc
crate (#11828) should be responsible for the libc link.The text was updated successfully, but these errors were encountered: