Skip to content
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

kirkstone: backport chromium from scarthgap #843

Draft
wants to merge 26 commits into
base: kirkstone
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7facbf6
chromium: Update to 121.0.6167.184 (#791)
MaxIhlenfeldt Mar 20, 2024
9269270
meta-browser: Update some README.md information (#797)
Mar 22, 2024
81d037b
chromium: Drop patches that are specific to clang < 17 (#801)
MaxIhlenfeldt Mar 23, 2024
d3a5f63
chromium: Update to 122.0.6261.128 (#803)
MaxIhlenfeldt Apr 15, 2024
ab76411
chromium: Fix gn build for Yocto master (#808)
MaxIhlenfeldt May 8, 2024
1dca432
chromium: Use STAGING_* dirs instead of RECIPE_SYSROOT(_NATIVE) (#810)
MaxIhlenfeldt May 10, 2024
24b4cdf
chromium: Fix build race condition (#812)
MaxIhlenfeldt May 13, 2024
d8bcd04
chromium: Depend on libstd-rs instead of rust (#809)
MaxIhlenfeldt May 13, 2024
68d56d5
chromium: Fix incremental build error after meta-clang update (#814)
MaxIhlenfeldt May 14, 2024
c3a84cc
chromium: Update to 123.0.6312.122 (#806)
MaxIhlenfeldt May 22, 2024
1ed2254
chromium: Backport missing dependency in NewTabPage (#816)
MaxIhlenfeldt May 22, 2024
40ef1d0
chromium: Update to 124.0.6367.207 (#819)
MaxIhlenfeldt Jun 17, 2024
718c798
chromium: Update to 125.0.6422.141 (#824)
MaxIhlenfeldt Jun 25, 2024
0a182ba
chromium: Merge interlinked compiler option patches (#825)
MaxIhlenfeldt Jun 25, 2024
83cb90c
chromium: Update to 126.0.6478.126 (#826)
MaxIhlenfeldt Jul 4, 2024
fd347dc
chromium: Update to 127.0.6533.99 (#828)
MaxIhlenfeldt Aug 20, 2024
e892cd6
chromium: fix do_copy_clang_library failed for multilib (#830)
hongxu-jia Aug 26, 2024
a722604
chromium: Update to 128.0.6613.84 (#832)
MaxIhlenfeldt Sep 3, 2024
7c0dcf7
chromium: Update to 128.0.6613.119 (#833)
MaxIhlenfeldt Sep 4, 2024
9a284a0
layer.conf: set LAYERSERIES_COMPAT to styhead
lumag Sep 6, 2024
608d411
chromium: Update to 128.0.6613.137 (#836)
MaxIhlenfeldt Sep 12, 2024
f7d3eac
layer.conf: Update to walnascar (5.2) layer/release series
kraj Oct 5, 2024
fbad39d
chromium: Update to 129.0.6668.70 (#838)
MaxIhlenfeldt Oct 9, 2024
f988d61
chromium: Update to 129.0.6668.100 (#840)
MaxIhlenfeldt Oct 10, 2024
901c92f
WIP: chromium: Adjust config to use lts-rust-mixin layer
adalessandro Oct 22, 2024
123b293
meta-chromium: Add kirkstone layer compat
adalessandro Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meta-chromium/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ BBFILE_PRIORITY_chromium-browser-layer = "7"
LAYERVERSION_chromium-browser-layer = "1"
LAYERSERIES_COMPAT_chromium-browser-layer = "scarthgap styhead walnascar"

LAYERDEPENDS_chromium-browser-layer = "clang-layer core openembedded-layer"
LAYERDEPENDS_chromium-browser-layer = "clang-layer core openembedded-layer lts-rust-mixin"
4 changes: 2 additions & 2 deletions meta-chromium/recipes-browser/chromium/chromium-gn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require gn-utils.inc

GTKIC_VERSION = "${@bb.utils.contains('PACKAGECONFIG', 'gtk4', '4', '3',d)}"

inherit features_check gtk-icon-cache qemu rust-common
inherit features_check gtk-icon-cache qemu

# The actual directory name in out/ is irrelevant for GN.
OUTPUT_DIR = "out/Release"
Expand Down Expand Up @@ -69,7 +69,6 @@ DEPENDS += " \
jpeg \
libdrm \
libffi \
libstd-rs \
libwebp \
libxkbcommon \
libxslt \
Expand All @@ -84,6 +83,7 @@ DEPENDS += " \
pkgconfig-native \
${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
qemu-native \
rust \
rust-native \
virtual/libgl \
"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f4f50a5de596d13d18f1f9b80f83e446936a4afb Mon Sep 17 00:00:00 2001
From 04beeabae402f02203a668b55a08a47ace41f8f4 Mon Sep 17 00:00:00 2001
From: Max Ihlenfeldt <[email protected]>
Date: Tue, 16 Jan 2024 12:29:30 +0000
Subject: [PATCH] Adjust the Rust build to our needs
Expand All @@ -19,11 +19,11 @@ Signed-off-by: Max Ihlenfeldt <[email protected]>
build/config/rust.gni | 26 +++++++++++++++++++-------
build/rust/rustc_wrapper.py | 1 +
build/rust/std/BUILD.gn | 28 +++++++++++++++++++++-------
build/rust/std/find_std_rlibs.py | 16 +++++++++++-----
4 files changed, 52 insertions(+), 19 deletions(-)
build/rust/std/find_std_rlibs.py | 17 ++++++++++++-----
4 files changed, 53 insertions(+), 19 deletions(-)

diff --git a/build/config/rust.gni b/build/config/rust.gni
index fd4c683..25fcb4e 100644
index fd4c683442..25fcb4e147 100644
--- a/build/config/rust.gni
+++ b/build/config/rust.gni
@@ -97,6 +97,11 @@ declare_args() {
Expand Down Expand Up @@ -82,7 +82,7 @@ index fd4c683..25fcb4e 100644
} else if (is_android) {
import("//build/config/android/abi.gni")
diff --git a/build/rust/rustc_wrapper.py b/build/rust/rustc_wrapper.py
index b8e490d..d22cf08 100755
index b8e490da27..d22cf08aad 100755
--- a/build/rust/rustc_wrapper.py
+++ b/build/rust/rustc_wrapper.py
@@ -160,6 +160,7 @@ def main():
Expand All @@ -94,7 +94,7 @@ index b8e490d..d22cf08 100755
abs_build_root = os.getcwd().replace('\\', '/') + '/'
is_windows = sys.platform == 'win32' or args.target_windows
diff --git a/build/rust/std/BUILD.gn b/build/rust/std/BUILD.gn
index b9500ee..3acbdf7 100644
index b9500eeabb..3acbdf7f94 100644
--- a/build/rust/std/BUILD.gn
+++ b/build/rust/std/BUILD.gn
@@ -189,7 +189,8 @@ if (toolchain_has_rust) {
Expand Down Expand Up @@ -157,7 +157,7 @@ index b9500ee..3acbdf7 100644
# The host builds tools toolchain supports Rust only and does not use
# the allocator remapping to point it to PartitionAlloc.
diff --git a/build/rust/std/find_std_rlibs.py b/build/rust/std/find_std_rlibs.py
index 386258f..e8fdaa9 100755
index 386258f890..3bb6a41a40 100755
--- a/build/rust/std/find_std_rlibs.py
+++ b/build/rust/std/find_std_rlibs.py
@@ -17,7 +17,7 @@ import re
Expand Down Expand Up @@ -196,7 +196,7 @@ index 386258f..e8fdaa9 100755

# Use the number of times we've seen this name to disambiguate the output
# filenames. Since we sort the input filenames including the metadata,
@@ -117,14 +119,18 @@ def main():
@@ -117,14 +119,19 @@ def main():
output_filename = f"lib{concise_name}.rlib"

infile = os.path.join(rustlib_dir, f)
Expand All @@ -210,8 +210,9 @@ index 386258f..e8fdaa9 100755
+ outfile = os.path.join(lib_output_dir, f)
copy_file(infile, outfile)

+ infile = os.path.join(os.environ['RUST_TARGET_PATH'], f'{args.target}.json')
+ outfile = os.path.join(args.output, 'target.json')
+ f = 'target.json'
+ infile = os.path.join(rustlib_dir, '..', f)
+ outfile = os.path.join(args.output, f)
+ copy_file(infile, outfile)
+
depfile.write("\n")
Expand Down
26 changes: 26 additions & 0 deletions meta-chromium/recipes-browser/chromium/rust_%.bbappend
MaxIhlenfeldt marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Chromium copies this file to a local sysroot. For class-target, it already
# gets installed, but for the native build we need to append this.
# Note: this isn't strictly needed for the compilation to work, but it's easier
# than making Chromium only copy it for the target and not the host.
rust_do_install:append() {
install -m 0644 ${WORKDIR}/rust-targets/${RUST_TARGET_SYS}.json ${D}${libdir}/rustlib/${RUST_TARGET_SYS}/target.json
}

# This makes sure that all .rlib files that Chromium needs get installed. The
# libraries installed by libstd-rs don't include e.g. libprofiler_builtins.
# Additionally, libstd and libtest installed by libstd-rs don't follow the usual
# naming scheme, which would trip up Chromium.
rust_do_install:class-target:append() {
mkdir -p _dist
rlib_path="rust-std-${PV}-${RUST_TARGET_SYS}/rust-std-${RUST_TARGET_SYS}/lib/rustlib"
tar -C _dist -xf build/dist/rust-std-${PV}-${RUST_TARGET_SYS}.tar.xz $rlib_path

target_dir=${D}${libdir}/rustlib
install -d $target_dir
cp -r _dist/$rlib_path/${RUST_TARGET_SYS} $target_dir
rm -rf _dist
}

# Override the default dependency on libstd-rs, as we copy the libraries
# manually above.
RUSTLIB_DEP = ""