Skip to content

Commit c09be48

Browse files
krajotavio
authored andcommitted
chromium: Use libcxx runtime for native binaries
This patch enables using llvm runtime instead of standard gnu runtime even on native binaries which are built during build, helps avoid depending on libstdc++ completely for chromium build Fix will complete kraj/meta-clang#449 please note that it will need master branch of meta-clang and is not backportable to older releases Signed-off-by: Khem Raj <[email protected]>
1 parent d2341f7 commit c09be48

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ DEPENDS += " \
6060
atk \
6161
bison-native \
6262
cairo \
63-
curl \
64-
dbus \
6563
expat \
6664
flac \
6765
freetype \
@@ -86,6 +84,7 @@ DEPENDS += " \
8684
qemu-native \
8785
virtual/libgl \
8886
"
87+
DEPEND_append_runtime-llvm = " compiler-rt-native libcxx-native"
8988

9089
# The wrapper script we use from upstream requires bash.
9190
RDEPENDS_${PN} = "bash"
@@ -254,6 +253,11 @@ GN_ARGS += ' \
254253
google_default_client_secret="${GOOGLE_DEFAULT_CLIENT_SECRET}" \
255254
'
256255

256+
# Use libcxx headers for native parts
257+
BUILD_CPPFLAGS_append_rumtime-llvm = " -isysroot=${STAGING_DIR_NATIVE} -stdlib=libc++"
258+
# Use libgcc for native parts
259+
BUILD_LDFLAGS_append_runtime-llvm = " -rtlib=libgcc -unwindlib=libgcc -stdlib=libc++ -lc++abi -rpath ${STAGING_LIBDIR_NATIVE}"
260+
257261
# Toolchains we will use for the build. We need to point to the toolchain file
258262
# we've created, set the right target architecture and make sure we are not
259263
# using Chromium's toolchain (bundled clang, bundled binutils etc).

0 commit comments

Comments
 (0)