Skip to content

Commit 3840a50

Browse files
committed
chromium: Create packageconfig to control libc++ to use
This helps to use either system provided libc++ or bundled libc++ with chromium. Defaults in chromium is to use bundled version, however in OE we have used the system provided so far, therefore the default are not changed here, just an option offered to enable custom libc++ if someone desires so. Should we default to use the custom copy by default, perhaps yes but thats a separate discussion Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent dcdb45b commit 3840a50

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

meta-chromium/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ PACKAGECONFIG knobs
9090
* cups: (off by default)
9191
Enables CUPS support in Chromium, and adds a dependency on the "cups" recipe.
9292

93+
* custom-libcxx (off by default)
94+
Enable vendored version of C++ runtime ( libc++ ) instead of using this from
95+
meta-clang provided libc++, this could be useful in some cases, where the
96+
binary is to be run on foreign systems which are not built using OE/Yocto
97+
base
98+
9399
* gtk4: (off by default)
94100
Enables GTK4 runtime support in Chromium by adding --gtk-version=4
95101
to the command line. Chromium is still built against GTK3.

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"
118118
# and command-line switches (extra dependencies should not
119119
# be necessary but are OK to add).
120120
PACKAGECONFIG[component-build] = ""
121+
122+
# Starting with M61, Chromium defaults to building with its own copy of libc++
123+
# instead of the system's libstdc++. Add a knob to control this behavior
124+
# https://groups.google.com/a/chromium.org/d/msg/chromium-packagers/8aYO3me2SCE/SZ8pJXhZAwAJ
125+
PACKAGECONFIG[custom-libcxx] = "use_custom_libcxx=true,use_custom_libcxx=false,,"
126+
121127
PACKAGECONFIG[cups] = "use_cups=true,use_cups=false,cups"
122128
PACKAGECONFIG[gtk4] = ""
123129
PACKAGECONFIG[kiosk-mode] = ""
@@ -169,11 +175,6 @@ GN_ARGS += 'host_pkg_config="pkg-config-native"'
169175
# See also: https://groups.google.com/a/chromium.org/d/msg/chromium-dev/hkcb6AOX5gE/PPT1ukWoBwAJ
170176
GN_ARGS += "is_debug=false is_official_build=true"
171177

172-
# Starting with M61, Chromium defaults to building with its own copy of libc++
173-
# instead of the system's libstdc++. Explicitly disable this behavior.
174-
# https://groups.google.com/a/chromium.org/d/msg/chromium-packagers/8aYO3me2SCE/SZ8pJXhZAwAJ
175-
GN_ARGS += "use_custom_libcxx=false"
176-
177178
# Use lld linker its quicker see https://lld.llvm.org/#performance
178179
GN_ARGS += "use_lld=true use_gold=false"
179180

0 commit comments

Comments
 (0)