-
Notifications
You must be signed in to change notification settings - Fork 8
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
Figure out how to handle target-specific settings. #30
Comments
To give some background on these examples and why they exist in rustbuild:
I think that roughly everything fits in this bucket of "weird toolchain muck", and I can't really think of a better solution other than the following. We could update the source code in rust-lang/rust to know when it's being built by Cargo, and in that case it tweaks how linkage works. The base assumption is that you, the builder, have a full development toolchain for the target locally that rustc can use. The linker itself would pull in the right object files from itself (rustc wouldn't tell the linker to stop injecting object files) and crates like liblibc when linked by libstd would unconditionally say All-in-all I think that for stabilization we probably want to be conservative and either have a whitelist or a blacklist of targets. This problem generally affects anything requiring a C library (since it's loaded from the system), and only targets that have zero non-Rust dependencies (wasm32-unknown-unknown, custom target specs, etc) are guaranteed to work. |
Distros and extern build systems using Cargo would want to handle these special cases themselves anyways. It's just easier for them if Cargo doesn't special case those platforms. |
Some targets are not supported because they have special logic in bootstrap for flags/features needed. musl, wasi, windows-gnu, etc. Will need to figure out how to handle these. It would be ideal not to hard-code them in cargo, but is there some way to specify what's needed via config files?
Here are some examples:
The text was updated successfully, but these errors were encountered: