Skip to content

Commit 49beed9

Browse files
author
Raphael Kubo da Costa
committed
chromium: Switch to using libc++ and compiler_rt in target builds.
This follows what upstream has done in its official builds for years. We had already been using clang in our builds, but with libstdc++. This has occasionally caused a number of build issues over the years (e.g. #482), so it makes sense to just follow upstream's toolchain choices more closely. Due to kraj/meta-clang#449 the native parts of the build are still using libstdc++ though, so not all libstdc++-related patches could be removed in this commit. This change has been tested exhaustively by multiple people as reported in the bug below. Big thanks to @kraj, @msisov, @MastaG and @r1mikey for their testing! Fixes #488.
1 parent 15228b0 commit 49beed9

File tree

5 files changed

+6
-601
lines changed

5 files changed

+6
-601
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ SRC_URI += " \
1515
file://0004-BUILD-do-not-specify-march-on-arm.patch \
1616
file://0005-Consider-armv7ve-define.patch \
1717
file://0006-Delete-compiler-options-not-available-in-release-ver.patch \
18-
file://0007-Move-CharAllocator-definition-to-a-header-file.patch \
1918
file://0008-Fix-sandbox-Aw-snap-for-syscalls-403-and-407.patch \
2019
file://0009-RandBytes-Stop-including-sys-random.h-on-Linux.patch \
2120
file://0010-avoid-link-latomic-failure-on-CentOS-8-host.patch \
2221
file://0011-Fix-use-of-DCHECK-with-std-unique_ptr.patch \
23-
file://0012-IWYU-add-ctime-for-std-time.patch \
24-
file://0013-mojo-Include-string.h-for-strncpy-declaration.patch \
2522
"
2623

2724
SRC_URI_append_libc-musl = "\

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ TOOLCHAIN = "clang"
1818
# to build the native recipes (e.g. GN) with clang too.
1919
TOOLCHAIN_class-native = "clang"
2020

21+
# This makes the target build use libc++ and compiler_rt instead of the GNU
22+
# runtime, just like upstream does. The native binaries compiled and run as
23+
# part of the build still use libstdc++ and libgcc though (see
24+
# https://github.com/kraj/meta-clang/issues/449).
25+
RUNTIME = "llvm"
26+
2127
inherit mime-xdg pythonnative
2228
DEPENDS += "python-setuptools-native"
2329

0 commit comments

Comments
 (0)