Skip to content

Commit 1dca432

Browse files
chromium: Use STAGING_* dirs instead of RECIPE_SYSROOT(_NATIVE) (#810)
Build and patch changes: ------------------------ Replace all usages off `RECIPE_SYSROOT` and `RECIPE_SYSROOT_NATIVE` with the respective matching `STAGING_*` variables to ensure compatibility with all build setups. License changes: ---------------- Added licenses: none. Removed licenses: none. Updated licenses: none. Test-built: ----------- * chromium-wayland: - nanbield, clang, MACHINE=qemuarm64 Signed-off-by: Max Ihlenfeldt <[email protected]>
1 parent ab76411 commit 1dca432

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ GN_ARGS += 'max_jobs_per_link="${@oe.utils.parallel_make_argument(d, '%d')}"'
305305
# Rust code is rebuilt after updating the Rust toolchain. This is irrelevant for
306306
# our build setup, but not setting it leads to an error.
307307
GN_ARGS += ' \
308-
rust_sysroot_absolute="${RECIPE_SYSROOT_NATIVE}/usr" \
308+
rust_sysroot_absolute="${STAGING_DIR_NATIVE}/usr" \
309309
rustc_version="custom" \
310310
rust_target_triple_vendor_for_target="${TARGET_VENDOR}" \
311311
'
@@ -441,7 +441,7 @@ do_add_clang_symlink () {
441441
# links against libclang_rt.builtins.a and uses the `clang_version` GN
442442
# variable to find it. This allows us to set it to the same value for all
443443
# Yocto releases.
444-
cd "${RECIPE_SYSROOT_NATIVE}/usr/lib/clang"
444+
cd "${STAGING_LIBDIR_NATIVE}/clang"
445445
# find the directory containing the library
446446
for dir in *; do
447447
if [ -n "$(find $dir -name 'libclang_rt.builtins*')" ] ; then
@@ -456,18 +456,18 @@ do_copy_clang_library () {
456456
# Chromium needs to link against libclang_rt.builtins.a for both host and
457457
# target code, and expects to find both libraries in the same directory
458458
# (thanks to 0023-Use-the-correct-path-to-libclang_rt.builtins.a.patch).
459-
cd "${RECIPE_SYSROOT}"
460-
lib_file="$(find usr/lib/clang -name 'libclang_rt.builtins*')"
459+
cd "${STAGING_LIBDIR}"
460+
lib_file="$(find clang -name 'libclang_rt.builtins*')"
461461
lib_dir="$(dirname $lib_file)"
462-
cp "$lib_file" "${RECIPE_SYSROOT_NATIVE}/$lib_dir"
462+
cp "$lib_file" "${STAGING_LIBDIR_NATIVE}/$lib_dir"
463463
}
464464
addtask copy_clang_library after do_configure before do_compile
465465

466466
do_copy_target_rustlibs () {
467467
# Chromium needs a single Rust sysroot that contains the rustlibs for both
468468
# the host and target, so we copy the target rustlibs to the native sysroot.
469-
rustlib_src_dir="${RECIPE_SYSROOT}/usr/lib/rustlib/${TARGET_ARCH}"*
470-
cp -r $rustlib_src_dir "${RECIPE_SYSROOT_NATIVE}/usr/lib/rustlib"
469+
rustlib_src_dir="${STAGING_LIBDIR}/rustlib/${TARGET_ARCH}"*
470+
cp -r $rustlib_src_dir "${STAGING_LIBDIR_NATIVE}/rustlib"
471471
}
472472
addtask copy_target_rustlibs after do_configure before do_compile
473473

0 commit comments

Comments
 (0)