-
Notifications
You must be signed in to change notification settings - Fork 195
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
chromium: Enable Rust #782
Conversation
This adds a dependency on OE's Rust recipe, as well as all the necessary changes to make Chromium successfully use that toolchain. Signed-off-by: Max Ihlenfeldt <[email protected]>
Some comments:
|
Signed-off-by: Max Ihlenfeldt <[email protected]>
@MaxIhlenfeldt These days I'm mostly involved in Rust in trying to help @sundeep-kokkonda and @Yashinde145 so I've mentioned this thread to them and I see that Sundeep cloned meta-browser so he may reply to your question. Also, for kirkstone, @g-scott-murray mentioned today that he is working on an update to (1.70?) of the rust mixin layer and that they are interested in chromium for AGL as you might already know. |
@MaxIhlenfeldt , Have attached the console.log file as well. |
Great to hear it works with the 1.68 mixin on kirkstone already! |
One note, as Rust is a hard requirement for Chromium 121, it'd be easiest to have this PR merged before I start working on the update. I'd also like to do a separate PR that removes all dunfell-specific patches first. But if it takes too long to merge this, I can start working on the update already. |
The |
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.
lgtm
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.
Sorry for the delay here. I know very little about Rust and how its toolchain works, so I can't really review the changes here but fully trust you and the others on this one.
Thanks for all the hard work, and I'm glad to see dunfell support finally going away!
virtual/libgl \ | ||
" | ||
DEPEND:append:runtime-llvm = " compiler-rt-native libcxx-native" |
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.
Out of curiosity, does this mean that this line was completely broken before?
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.
I think it was working before, but when Rust is enabled Chromium needs to link against the target clang runtime libraries, see https://source.chromium.org/chromium/chromium/src/+/main:build/config/compiler/BUILD.gn;l=1660-1668;drc=ab6484854e1fb7a38160336acc6b34b6ecdda628.
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.
Right, but does it mean the previous variable name was incorrect and therefore the assignment did not have any effect?
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.
Oh, right, I overlooked that I changed that as well. Yes, that might have indeed been the case 😅
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.
Interesting. That might explain some of the bug reports we've had over the years :-) Glad to see it's been fixed.
@otavio @kraj @MaxIhlenfeldt we'd normally create a "dunfell" branch at the commit ea731e8; I wonder if it makes sense given dunfell as a whole is going EoL in just a few months. |
I am not opposed as this is the last working version. |
Done! |
Fixes OSSystems#792. Build and patch changes: ------------------------ In OSSystems#782, we decided to depend on rust instead of libstd-rs, because the latter didn't include libprofiler_builtins and also used a naming scheme that trips up Chromium. However, in OSSystems#791 we decided to patch Chromium so that it doesn't need libprofiler_builtins any more, because the master version of the rust recipe also doesn't include it. Finally, while investigating OSSystems#792 it turned out that our approach breaks as soon as we have something that depends on libstd-rs in our dependency graph. In that scenario, both libstd-rs and rust (the latter due to our bbappend file) install Rust libraries to /usr/lib/rustlib. This first leads to Chromium build system errors (due to libstd-rs's naming scheme), and after fixing these to Rust compiler errors due to multiple versions being present. The conclusion is now that we can depend on libstd-rs we should do so. This only requires a small change to Chromium's Rust build scripts to adapt them to the slightly different naming scheme. License changes: ---------------- Added licenses: none. Removed licenses: none. Updated licenses: none. Test-built: ----------- * chromium-wayland: - nanbield, clang, MACHINE=qemuarm64 * chromium-x11: - master, clang, MACHINE=qemuarm Signed-off-by: Max Ihlenfeldt <[email protected]>
Fixes OSSystems#792. Build and patch changes: ------------------------ In OSSystems#782, we decided to depend on rust instead of libstd-rs, because the latter didn't include libprofiler_builtins and also used a naming scheme that trips up Chromium. However, in OSSystems#791 we decided to patch Chromium so that it doesn't need libprofiler_builtins any more, because the master version of the rust recipe also doesn't include it. Finally, while investigating OSSystems#792 it turned out that our approach breaks as soon as we have something that depends on libstd-rs in our dependency graph. In that scenario, both libstd-rs and rust (the latter due to our bbappend file) install Rust libraries to /usr/lib/rustlib. This first leads to Chromium build system errors (due to libstd-rs's naming scheme), and after fixing these to Rust compiler errors due to multiple versions being present. The conclusion is now that we can depend on libstd-rs we should do so. This only requires a small change to Chromium's Rust build scripts to adapt them to the slightly different naming scheme. License changes: ---------------- Added licenses: none. Removed licenses: none. Updated licenses: none. Test-built: ----------- * chromium-wayland: - nanbield, clang, MACHINE=qemuarm64 * chromium-x11: - master, clang, MACHINE=qemuarm Signed-off-by: Max Ihlenfeldt <[email protected]>
Fixes OSSystems#792. Build and patch changes: ------------------------ In OSSystems#782, we decided to depend on rust instead of libstd-rs, because the latter didn't include libprofiler_builtins and also used a naming scheme that trips up Chromium. However, in OSSystems#791 we decided to patch Chromium so that it doesn't need libprofiler_builtins any more, because the master version of the rust recipe also doesn't include it. Finally, while investigating OSSystems#792 it turned out that our approach breaks as soon as we have something that depends on libstd-rs in our dependency graph. In that scenario, both libstd-rs and rust (the latter due to our bbappend file) install Rust libraries to /usr/lib/rustlib. This first leads to Chromium build system errors (due to libstd-rs's naming scheme), and after fixing these to Rust compiler errors due to multiple versions being present. The conclusion is now that we can depend on libstd-rs we should do so. This only requires a small change to Chromium's Rust build scripts to adapt them to the slightly different naming scheme. License changes: ---------------- Added licenses: none. Removed licenses: none. Updated licenses: none. Test-built: ----------- * chromium-wayland: - nanbield, clang, MACHINE=qemuarm64 * chromium-x11: - master, clang, MACHINE=qemuarm Signed-off-by: Max Ihlenfeldt <[email protected]>
chromium: Depend on libstd-rs instead of rust Fixes #792. Build and patch changes: ------------------------ In #782, we decided to depend on rust instead of libstd-rs, because the latter didn't include libprofiler_builtins and also used a naming scheme that trips up Chromium. However, in #791 we decided to patch Chromium so that it doesn't need libprofiler_builtins any more, because the master version of the rust recipe also doesn't include it. Finally, while investigating #792 it turned out that our approach breaks as soon as we have something that depends on libstd-rs in our dependency graph. In that scenario, both libstd-rs and rust (the latter due to our bbappend file) install Rust libraries to /usr/lib/rustlib. This first leads to Chromium build system errors (due to libstd-rs's naming scheme), and after fixing these to Rust compiler errors due to multiple versions being present. The conclusion is now that we can depend on libstd-rs we should do so. This only requires a small change to Chromium's Rust build scripts to adapt them to the slightly different naming scheme. Also, while we're already reworking our Rust setup, we can remove the remaining part of our bbappend for the rust recipe and instead inherit the `rust-common` class, thereby inheriting `rust-target-config` (which needs stuff from `rust-common`). This means we get the `target.json` files the Rust compiler needs installed in the directory pointed to by the `RUST_TARGET_PATH` environment variable. License changes: ---------------- Added licenses: none. Removed licenses: none. Updated licenses: none. Test-built: ----------- * chromium-wayland: - nanbield, clang, MACHINE=qemuarm64 * chromium-x11: - master, clang, MACHINE=qemuarm Signed-off-by: Max Ihlenfeldt <[email protected]>
This adds a dependency on OE's Rust recipe, as well as all the necessary changes to make Chromium successfully use that toolchain.
This change will also mean we don't support any Yocto release older than kirkstone, as that is the first release with Rust in OE that isn't EOL yet. Most notably, we will drop support for dunfell.