Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions meta-chromium/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ BBFILE_PATTERN_chromium-browser-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_chromium-browser-layer = "7"

LAYERVERSION_chromium-browser-layer = "1"
LAYERSERIES_COMPAT_chromium-browser-layer = "scarthgap styhead walnascar whinlatter"
LAYERSERIES_COMPAT_chromium-browser-layer = "whinlatter"

LAYERDEPENDS_chromium-browser-layer = "clang-layer core openembedded-layer"
LAYERDEPENDS_chromium-browser-layer = "core openembedded-layer"
26 changes: 9 additions & 17 deletions meta-chromium/recipes-browser/chromium/chromium-gn.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ SRC_URI += "\
file://0005-avoid-link-latomic-failure-on-CentOS-8-host.patch \
file://0006-Don-t-pass-unknown-LLVM-options.patch \
file://0007-Fix-constexpr-variable-must-be-initialized-by-a-cons.patch \
file://0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch \
file://0009-Adjust-the-Rust-build-to-our-needs.patch \
file://0010-Don-t-require-profiler_builtins.rlib.patch \
file://0011-fix-check_version-Only-compare-node.js-major-version.patch \
Expand Down Expand Up @@ -75,6 +74,7 @@ DEPENDS += " \
libwebp \
libxkbcommon \
libxslt \
lld-native \
ninja-native \
nodejs-native \
nspr \
Expand All @@ -89,7 +89,7 @@ DEPENDS += " \
rust-native \
virtual/libgl \
"
DEPENDS:append:runtime-llvm = " compiler-rt compiler-rt-native libcxx-native"
DEPENDS:append = " compiler-rt compiler-rt-native libcxx-native"
DEPENDS:append:libc-musl = " libexecinfo"

LDFLAGS:append:libc-musl = " -lexecinfo"
Expand Down Expand Up @@ -284,12 +284,12 @@ GN_ARGS += ' \
'

# Use libcxx headers for native parts
BUILD_CPPFLAGS:append:runtime-llvm = " -isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++"
BUILD_CPPFLAGS:append = " -isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++"
# Use libgcc for native parts
BUILD_LDFLAGS:append:runtime-llvm = " -rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}"
LDFLAGS:append:runtime-llvm = " --target=${TARGET_SYS}"
CXXFLAGS:append:runtime-llvm = " --target=${TARGET_SYS} -nostdlib++"
CFLAGS:append:runtime-llvm = " --target=${TARGET_SYS}"
BUILD_LDFLAGS:append = " -rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}"
LDFLAGS:append = " --target=${TARGET_SYS}"
CXXFLAGS:append = " --target=${TARGET_SYS} -nostdlib++"
CFLAGS:append = " --target=${TARGET_SYS}"

# Toolchains we will use for the build. We need to point to the toolchain file
# we've created, set the right target architecture and make sure we are not
Expand Down Expand Up @@ -492,15 +492,7 @@ do_add_clang_latest () {
addtask add_clang_latest after do_configure before do_compile

do_copy_clang_library () {
# Chromium needs to link against libclang_rt.builtins.a for both host and
# target code, and expects to find both libraries in the same directory
# (thanks to 0008-Use-the-correct-path-to-libclang_rt.builtins.a.patch).
cd "${STAGING_DIR_HOST}${nonarch_libdir}/clang"
# lib_file = "./$CLANG_VERSION/lib/linux/libclang_rt.builtins-$ARCH.a"
lib_file="$(find . -name 'libclang_rt.builtins*')"
# stripped_lib_file = "lib/linux/libclang_rt.builtins-$ARCH.a"
stripped_lib_file="${lib_file#*/*/}"
cp "$lib_file" "${STAGING_LIBDIR_NATIVE}/clang/latest/${stripped_lib_file}"
cp -r ${STAGING_LIBDIR_NATIVE}/clang/latest ${STAGING_DIR_HOST}${nonarch_libdir}/clang/
}
addtask copy_clang_library after do_add_clang_latest before do_compile

Expand Down Expand Up @@ -637,4 +629,4 @@ ALLOW_EMPTY:${PN}-dev = "0"

# ERROR: QA Issue: lib32-chromium-ozone-wayland: ELF binary /usr/bin/chromium has relocations in .text [textrel]
INSANE_SKIP:${PN}:append:x86 = "textrel"

INSANE_SKIP:${PN}-dbg:append = "buildpaths"
75 changes: 44 additions & 31 deletions meta-chromium/recipes-browser/chromium/chromium.inc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,31 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 59942a3cf6..cf5e62eb15 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1255,26 +1255,6 @@ config("compiler_cpu_abi") {
"-msse3",
]
}
@@ -1301,23 +1301,6 @@
"-mfpmath=sse",
"-msse3",
]
- } else if (current_cpu == "arm") {
- if (is_clang && !is_android && !is_nacl && !is_chromeos_device) {
- if (is_clang && !is_android && !is_chromeos_device) {
- cflags += [ "--target=arm-linux-gnueabihf" ]
- ldflags += [ "--target=arm-linux-gnueabihf" ]
- }
- if (!is_nacl) {
- cflags += [
- "-march=$arm_arch",
- "-mfloat-abi=$arm_float_abi",
- ]
- }
- cflags += [
- "-march=$arm_arch",
- "-mfloat-abi=$arm_float_abi",
- ]
- if (arm_tune != "") {
- cflags += [ "-mtune=$arm_tune" ]
- }
- } else if (current_cpu == "arm64") {
- if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
- !is_chromeos_device) {
- if (is_clang && !is_android && !is_fuchsia && !is_chromeos_device) {
- cflags += [ "--target=aarch64-linux-gnu" ]
- ldflags += [ "--target=aarch64-linux-gnu" ]
- }
} else if (current_cpu == "mipsel" && !is_nacl) {
} else if (current_cpu == "mipsel") {
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
@@ -1282,9 +1262,6 @@ config("compiler_cpu_abi") {
@@ -1325,9 +1308,6 @@
if (is_android) {
cflags += [ "--target=mipsel-linux-android" ]
ldflags += [ "--target=mipsel-linux-android" ]
Expand All @@ -59,7 +56,7 @@ index 59942a3cf6..cf5e62eb15 100644
}
} else {
cflags += [ "-EL" ]
@@ -1364,8 +1341,6 @@ config("compiler_cpu_abi") {
@@ -1407,8 +1387,6 @@
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
if (is_clang) {
Expand All @@ -68,7 +65,7 @@ index 59942a3cf6..cf5e62eb15 100644
} else {
cflags += [ "-EB" ]
ldflags += [ "-EB" ]
@@ -1414,8 +1389,6 @@ config("compiler_cpu_abi") {
@@ -1457,8 +1435,6 @@
cflags += [ "--target=mips64el-linux-android" ]
ldflags += [ "--target=mips64el-linux-android" ]
} else {
Expand All @@ -77,7 +74,7 @@ index 59942a3cf6..cf5e62eb15 100644
}
} else {
cflags += [
@@ -1473,8 +1446,6 @@ config("compiler_cpu_abi") {
@@ -1516,8 +1492,6 @@
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
if (is_clang) {
Expand All @@ -86,14 +83,14 @@ index 59942a3cf6..cf5e62eb15 100644
} else {
cflags += [
"-EB",
@@ -1656,23 +1627,6 @@ config("compiler_deterministic") {
@@ -1686,23 +1660,6 @@
}
}

- # Tells the compiler not to use absolute paths when passing the default
- # paths to the tools it invokes. We don't want this because we don't
- # really need it and it can mess up the RBE cache entries.
- if (is_clang && (!is_nacl || is_nacl_saigo)) {
- if (is_clang) {
- cflags += [ "-no-canonical-prefixes" ]
-
- # Same for links: Let the compiler driver invoke the linker
Expand All @@ -107,7 +104,7 @@ index 59942a3cf6..cf5e62eb15 100644
- }
- }
-
if (use_libcxx_modules) {
if (use_clang_modules) {
cflags += [
# This removes absolute paths from .pcm files.
--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,34 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index cf5e62eb15..58e0fd0a71 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -629,13 +629,6 @@ config("compiler") {
@@ -687,16 +687,6 @@
cflags += [ "-ffp-contract=off" ]
}

- # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
- # (excluding toolchains that use an older version of LLVM).
- # TODO(crbug.com/376278218): This causes segfault on Linux ARM builds.
- # It also causes segfault on Linux s390x:
- # https://github.com/llvm/llvm-project/issues/149511
- if (is_linux && use_lld && !llvm_android_mainline && current_cpu != "arm" &&
- current_cpu != "s390x" &&
- default_toolchain != "//build/toolchain/cros:target") {
- cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
- }
}

# C11/C++11 compiler flags setup.
@@ -2083,6 +2076,11 @@ config("default_warnings") {
}
@@ -2086,6 +2076,11 @@
# this as well. http://crbug.com/316352
"-Wno-unneeded-internal-declaration",

cflags += [
+ # Disable unknown warnings, since system clang may not have
+ # backported newer warning yet unlike internal clang that
+ # chromium uses.
+ "-Wno-unknown-warning-option",
+ # Disable unknown warnings, since system clang may not have
+ # backported newer warning yet unlike internal clang that
+ # chromium uses.
+ "-Wno-unknown-warning-option",
+
# TODO(crbug.com/330524456): -Wcast-function-type is under -Wextra now.
"-Wno-cast-function-type",
# TODO(crbug.com/330524456): -Wcast-function-type is under -Wextra now.
"-Wno-cast-function-type",

--
2.39.5
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Co-authored-by: Caner Altinbasak <[email protected]>
Signed-off-by: Max Ihlenfeldt <[email protected]>
---
build/config/rust.gni | 28 ++++++++++++++++++----------
build/rust/filter_clang_args.py | 5 +++++
build/rust/rustc_wrapper.py | 1 +
...ni_impl/filter_clang_args.py | 5 +++++
...ni_impl/rustc_wrapper.py | 1 +
build/rust/std/BUILD.gn | 28 +++++++++++++++++++++-------
build/rust/std/find_std_rlibs.py | 16 +++++++++++-----
5 files changed, 56 insertions(+), 22 deletions(-)
Expand Down Expand Up @@ -97,10 +97,10 @@ index bd18d13119..e260576fba 100644
cargo_target_abi = ""
}
} else if (is_android) {
diff --git a/build/rust/filter_clang_args.py b/build/rust/filter_clang_args.py
diff --git a/build/rust/gni_impl/filter_clang_args.py b/build/rust/gni_impl/filter_clang_args.py
index 5a1843c0df..7fb4b49516 100644
--- a/build/rust/filter_clang_args.py
+++ b/build/rust/filter_clang_args.py
--- a/build/rust/gni_impl/filter_clang_args.py
+++ b/build/rust/gni_impl/filter_clang_args.py
@@ -24,6 +24,11 @@ def filter_clang_args(clangargs):
pass
elif args[i].startswith('-plugin-arg'):
Expand All @@ -113,10 +113,10 @@ index 5a1843c0df..7fb4b49516 100644
else:
yield args[i]
i += 1
diff --git a/build/rust/rustc_wrapper.py b/build/rust/rustc_wrapper.py
diff --git a/build/rust/gni_impl/rustc_wrapper.py b/build/rust/gni_impl/rustc_wrapper.py
index 8f2096dfe5..de43d44eed 100755
--- a/build/rust/rustc_wrapper.py
+++ b/build/rust/rustc_wrapper.py
--- a/build/rust/gni_impl/rustc_wrapper.py
+++ b/build/rust/gni_impl/rustc_wrapper.py
@@ -160,6 +160,7 @@ def main():
rustc_args = remaining_args[:ldflags_separator]
ldflags = remaining_args[ldflags_separator + 1:rustenv_separator]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ BUILD_LD = "${CXX}"
BUILD_AR = "llvm-ar"

DEPENDS = "clang-native ninja-native"
DEPENDS:append:runtime-llvm = " compiler-rt-native libcxx-native"
DEPENDS:append = " compiler-rt-native libcxx-native"
# Use libcxx headers for native parts
CXXFLAGS:append:runtime-llvm = " -isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++"
CXXFLAGS:append = " -isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++"
# Use libgcc for native parts
LDFLAGS:append:runtime-llvm = " -rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}"
LDFLAGS:append = " -rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}"

do_configure[noexec] = "1"

Expand Down