-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Bootstrap config: libgccjit libs dir #149354
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
base: main
Are you sure you want to change the base?
Bootstrap config: libgccjit libs dir #149354
Conversation
|
This PR changes how GCC is built. Consider updating src/bootstrap/download-ci-gcc-stamp. This PR modifies If appropriate, please update |
|
|
|
@Kobzol: I'm sending this PR to gather some feedback from you or others. How can I add tests for this new bootstrap config? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #149348) made this pull request unmergeable. Please resolve the merge conflicts. |
1bf3007 to
2125647
Compare
|
I will focus on #149426 first, as I think that we should first deal with the compiler/cg_gcc side of things, before we go modify bootstrap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, although the implementation needs some changes. I'd be happy to play with this if you don't want to deal with doing these bootstrap changes.
|
☔ The latest upstream changes (presumably #149426) made this pull request unmergeable. Please resolve the merge conflicts. |
…rustlib directory
7eb0416 to
dc178b5
Compare
This will allow users to provide pre-built cross-compiled dylibs, while still downloading common (e.g. x64) dylibs from the CI.
|
I refactored the code a bit to more explicitly model that we have multiple target libgccjit dylibs per host, and also to enable both downloading from CI and using prebuilt libgccjit.so files (so that people don't also have to build their x64 libgccjit.so from scratch). Please let me know if it makes sense to you. |
This comment has been minimized.
This comment has been minimized.
This commit makes sense to me. |
If you already have it prepared, yeah, you could try it. Although CI failed, so maybe there's something else wrong. |
Good. I try that right away. |
The command finished running and the issue with the m68k |
|
I suspect I know where is the issue. bootstrap hacks around this for LLVM, but I don't like how it is done (I want to refactor how LLVM is handled in bootstrap, as it's super messy right now, but it's very hard). In that case, I would actually suggest to sidestep this issue entirely and use a different directory structure: This will run into an issue with Rustup later, but we would have the exact same issue even with the current layout, so it doesn't really matter. What do you think? |
This comment has been minimized.
This comment has been minimized.
I'm OK with this directory structure. |
|
I certainly hope not 😆 Bootstrap should only be deleting |
Ok. I'll try this new directory structure locally to see if that works. If so, I'll push it here. |
This comment has been minimized.
This comment has been minimized.
| return; | ||
| } | ||
|
|
||
| // <rustc>/lib/<host-target>/codegen-backends |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
There seems to be one issue: the native m68k @Kobzol: Any idea what could be wrong here? Edit: Could it be the step "Uplifting library (stage1:x86_64-unknown-linux-gnu -> stage2:m68k-unknown-linux-gnu)" that does that? |
|
My investigation leads me to believe that we don't fill properly My understanding is that for a specific stage, we need:
But that code seems to consider the host target (the one used to build the rustc) instead. |
|
It fascinates me how complicated is the handling of target pairs. We can be really thankful to LLVM for being able to cross-compile to multiple targets, otherwise bootstrap would have to handle yet another configuration axis 😆 This is kinda insane. I pushed a change that should build libgccjit for more targets. But it's quite difficult to debug without having access to a repro. If you could send me the whole libgcc-libs-dir prepared for the m68k cross-compilation, that would be useful. |
Indeed.
Thanks. In the mean time, I believe you could try using |
r? @Kobzol