-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Is (cross-)compiling with an "alt" compiler and "non-alt" standard library supported? #43085
Comments
Disabling LLVM assertions in Nightly would make this whole issue go away since alternate compiler builds would become unnecessary. |
I believe the tl;dr; is basically "no, this is not a supported configuration". The intention was that these builds would be for developer-only machines which didn't need the full power of the rest of the toolchain. |
Developers working on platform-specific issues or features need to cross-compile. We don’t need full toolchains for target (as opposed to host) platforms, only We can probably rework bootstrapping on our side so that "non-alt" builds are used for cross-compiling, but if fixing #42967 on the rustc side is reasonably feasible that would be nicer. |
@SimonSapin - iirc, the way alt builds were added was kind of a hack to begin with, intended as a way to get Servo a build without assertions. It was acknowledged at the time it wasn't the best solution, but we hoped that it would be good enough. It sounds like we're saying now that the hack didn't end up being good enough. If that's the case, sounds like we should get people together again to see if we can come up with another solution. |
I’m not sure “not good enough” applies. There is one known issue. I don’t know if that makes the whole approach flawed or if it’s “just” a bug/regression that can be fixed. (Specifically, when loading a procedural macro crate, the hash/filename expected by that crate for |
@alexcrichton - is there a way to address this hash/filename issue on macOS? Is it possible it's just a bug that hasn't gotten fixed yet? |
That PR adds |
This hopefully fixes rust-lang#42967 and rust-lang#43085.
Opened #43167 |
…hton Enable profiler on "alternate" builds This hopefully fixes rust-lang#42967 and rust-lang#43085.
Closing as per #43085 (comment). We should try to keep these in sync when possible, I guess, though... |
Ah, yes. I meant for #43167 to close this. We moved Servo back to using alt rustc with normal std in servo/servo#17727. |
#39754 added “alternate” builds for a small number of platforms. They disable LLVM assertions, significantly improving compile times compared to Nightly. More background: https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388
Servo uses these by default when available. Them being only available for a small number of platforms is ok because that covers platforms most developers use, and we can fall back to "normal" slower Nightly compilers.
In #42967 we ran into an issue that only occurred on OS X, when compiling crates that depend on procedural macro crates, when using an "alt" compiler with a "non-alt" standard library. It seems in theory that enabling or disabling LLVM assertions in rustc should not have any effect on standard libraries, but we worked around that issue in servo/servo#17575 by making sure we download an std of the same kind as rustc.
It gets tricky when cross-compiling (for example to Android), since "alt" standard libraries are not necessarily available for the target platform even when they are for the host. In servo/servo#17604 we might need to rewrite our
mach
configuration handling and Rust bootstrapping to be able to support selecting an "alt" vs "non-alt" compiler depending on the cross-compilation target.But do we really need to? Or is #42967 a rustc bug after all? "Should" it work to use an "alt" rustc with "non-alt" std?
CC @aturon since I don’t know are the appropriate people to ask, please redirect.
The text was updated successfully, but these errors were encountered: