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
When attempting to cross compile from aarch64-unknown-linux-gnu to x86_64-unknown-linux-musl this crate chooses a completely wrong compiler name: musl-gcc. The must-gcc compiler cannot be used to build x86_64 under an aarch64 machine.
Why is cc-rs not using RUSTC_LINKER in this case which points to a valid compiler/linker for the target platform?
The text was updated successfully, but these errors were encountered:
In a way the question answers itself. I mean the answer to the "why" is obviously somebody asked the related "why" question before and came up with an answer that made sense in a specific situation:-) But on a serious note, a similar question was asked and even with a reference to musl. The suggestion was to scrap most of the mapping table, more specifically entries for targets that rely on cross-linker having to be specified (and as a result being passed as RUSTC_LINKER). As an alternative one can flip the priorities and use the table as a fallback. As opposed to using RUSTC_LINKER as fallback that is. (I also advocate for providing an interface to interrogate rustc for linker, so that we have something to work with in case RUSTC_LINKER is not set...)
When attempting to cross compile from aarch64-unknown-linux-gnu to x86_64-unknown-linux-musl this crate chooses a completely wrong compiler name:
musl-gcc
. Themust-gcc
compiler cannot be used to build x86_64 under an aarch64 machine.Why is
cc-rs
not using RUSTC_LINKER in this case which points to a valid compiler/linker for the target platform?The text was updated successfully, but these errors were encountered: