-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make cargo-c to always use the C compiler provided in CC #419
Comments
cargo-c uses cargo's settings, so if you set the linker it would pick it. What does FreeBSD do for the normal cargo packages? |
cargo is called with the environment like this:
It might be that the linker isn't specifically set and cc is used in general. We just noticed this while specifically looking at the cargo-c project. |
|
How to pass a linker without enabling the cross-compilation mode? |
You may set a But this is not related to cargo-c itself so probably it is better moving to the cargo zulip :) |
The cross-compilation option The option Setting Do you know why doesn't And again: how to make cargo-c to use the CC environment variable as a linker? cargo-c uses the "cc" crate which does manipulate commands, it has "cc" and "CC" hard-coded. |
You actually always "cross compile" when using clang or rustc. And it gets even more important since cargo has a partial understanding on which flags go with the host build target (e.g. build.rs and proc macros) and which ones go with the target build target. setting the blanket |
I only need to force a specific linker command. The documentation linked above asks to add linker under |
On FreeBSD cargo-c uses the "cc" executable, which is at odds with the ports' ability to override the C and C++ compilers.
How to make cargo-c to always use the CC environment variable?
The text was updated successfully, but these errors were encountered: