Skip to content

Commit e109eb7

Browse files
krajRaphael Kubo da Costa
authored andcommitted
chromium: Set LIBCPLUSPLUS to use libc++
This should fix issue seen with #551 Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Martin Jansa <[email protected]>
1 parent d1ba852 commit e109eb7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ TOOLCHAIN:class-native = "clang"
2424
# https://github.com/kraj/meta-clang/issues/449).
2525
RUNTIME = "llvm"
2626

27+
# meta-clang uses RUNTIME variable to add build dependencies on libcxx/compiler-rt
28+
# but does not add compiler options to commandline. It expects compiler's own
29+
# defaults to be used and compiler's buildtime defaults are chosen based on
30+
# global RUNTIME variable setting when building clang compiler, which defaults to 'gnu'.
31+
# For chromium libc++ is expected to be used therefore ensure that
32+
# right build flags are set for chromium irrespective of
33+
# distro defaults (which could be 'gnu' or 'llvm').
34+
# This also ensures that it does not rely too much on meta-clang's defaults.
35+
LIBCPLUSPLUS = "-stdlib=libc++"
36+
37+
# LIBCPLUSPLUS is included in CXXFLAGS and LDFLAGS, but chromium doesn't respect it
38+
# add it to TUNE_CCARGS as well to include it in CC/CXX variables which are respected.
39+
TUNE_CCARGS += "${LIBCPLUSPLUS}"
40+
2741
inherit mime-xdg pythonnative
2842
DEPENDS += "python-setuptools-native"
2943

0 commit comments

Comments
 (0)