By default GN produces a build with all of the debug assertions enabled (is_debug=true) and including full debug info (symbol_level=2). Setting symbol_level=1 will produce enough information for stack traces, but not line-by-line debugging. Setting symbol_level=0 will include no debug symbols at all. Either will speed up the build compared to full symbols.
This is done to avoid driver specific issues and restores the previous
behaviour. Like before video acceleration can be enabled without having
to rebuild Chromium.
This will additionally install the following files:
libEGL.so libGLESv2.so
libVkICD_mock_icd.so libvk_swiftshader.so libvulkan.so
libEGL.so and libGLESv2.so are required to fix our ANGLE support.
The rest should help with the Vulkan support (currently an experimental
feature that is disabled by default).
update.nix was a huuuuge hack, abusing checksum collisions, etc., and
was extremely difficult to read and maintain, especially because
values from update.nix were also used in the derivations themselves!
I've replaced this with an implementation in Python, which I chose for
readability. Rather than generating Nix, I chose to
generate JSON, since Python can do that in the standard library and
Nix can read it.
I also set update.py as an updateScript, so Chromium can now
automatically be updated!
Fixes: https://github.com/NixOS/nixpkgs/issues/89635
Note: The following might also need to be updated:
substituteStream(): WARNING: pattern '/usr/share/xcb' doesn't match anything in file 'ui/gfx/x/BUILD.gn'
I didn't look into this yet but IIRC M86 will finally have a flag for
Linux to enable VA-API. So we shouldn't need
enable-video-acceleration-on-linux.patch anymore.
But we likely need to update enable-vdpau-support-for-nvidia.patch
when/before M86 hits the stable channel if we want to keep VDPAU
support.
Ok, so I was about to update the patch (didn't apply anymore) when I
also started looking at it's usage and realized that
NIX_CHROMIUM_PLUGIN_PATH_ (and other substrings) only appears in the
patch itself (i.e. it seemed like we don't need this patch anymore).
Turns out that we have this patch since 2014 (1b84fbf0cac) and it was
only ever used for NIX_CHROMIUM_PLUGIN_PATH_WIDEVINE (and from the log
it isn't clear if/when or how well that worked). But in 2019 that last
usage got removed (545d58a1ef8) so we should be able to safely drop this
patch now :) \o/
(I just wanted to note that as it seemed somewhat of a funny story :D
But there is of course nothing wrong with it.)
Git history (git log --oneline -S NIX_CHROMIUM_PLUGIN_PATH_):
7205bd64a38d73ff8c46a5bb9d4732da1a26ac02 ungoogled-chromium: init at 81.0.4044.92-2
545d58a1ef8abb5a493654a84b9d6a3ca87a7909 chromium: fix widevine
cd3283f9218b70fdf39640ba1be6fa16e137c209 chromium: 67.0.3396.99 -> 68.0.3440.75
72d7b5ddb14a8b5903f01c7b40f216a0a6149fb8 chromium: fix nix_plugin_paths for 68+
7a3a16dd8040e7ba675b50ca47d023ee61f087d3 chromium: Remove plugin paths patch for version 50
79d18eb6045b33e081fbce4b66374ea75dfeeb5f chromium: Update dev channel to v52.0.2743.10
c7a3645e7bfe8bd6db7d3d9a320c2f07ea582347 chromium: Remove stuff for versions <= v51
8b97ca270e84c38bb0fb1da829da318ed7dbda8a chromium: Update all channels to latest versions
b9093f1c641846882fdced70269a4ee09c2c376b chromium: Updates, fixes#11492
471cdd15e2dd6ac1c20aa18e177e590d67de2c44 chromium: Update beta and dev channels.
5c6aa391fc480898fa80b34df4037e4ee8b2d8a6 chromium: Cleanup old patch and update stable
af54ddf8b635e2897db64d775317e33a42c259e2 chromium: Drop plugin_paths patch for old versions.
6a8afa4bb35ee9cffb8e62f5a294adc781b9d348 chromium: Fix plugin_paths patch for version 44.
0aad4b7ee418a5a4a6aa0c2da8a590480a63562a chromium: Update all channels to latest versions.
1b84fbf0cacaa3999979602919c3ee8df7ae9c6d chromium: Allow env vars for passing plugin paths.
After making `ffmpeg` point to the latest `ffmpeg_4`, all packages that
used `ffmpeg` without requiring a specific version now use ffmpeg_3
explicitly so they shouldn't change.
This provides the browser flag #enable-webrtc-pipewire-capturer, which
adds support for screensharing on Wayland via xdg-desktop-portal.
The browser flag is disabled by default until a user enables it. At
least one other major distribution (Arch) enables this compile time
option, and so I believe it should be safe to enable by default.
This is also needed to support xdg-desktop-portal-wlr which was added in
https://github.com/NixOS/nixpkgs/pull/83485.
The configuration phase was failing due to:
```
configuring
ERROR at //BUILD.gn:1376:5: Unknown function.
filter_exclude([ "$root_build_dir/foo" ],
^-------------
```
This can e.g. save around 150k lines of unnecessary log messages which
take up around 66% of the total lines (based on a log of 80.0.3987.100):
29527 warning: unknown warning option '-Wno-bitwise-conditional-parentheses'; did you mean '-Wno-bitwise-op-parentheses'? [-Wunknown-warning-option]
29527 warning: unknown warning option '-Wno-builtin-assume-aligned-alignment' [-Wunknown-warning-option]
29527 warning: unknown warning option '-Wno-deprecated-copy'; did you mean '-Wno-deprecated'? [-Wunknown-warning-option]
29527 warning: unknown warning option '-Wno-final-dtor-non-final-class'; did you mean '-Wno-abstract-final-class'? [-Wunknown-warning-option]
29527 warning: unknown warning option '-Wno-implicit-int-float-conversion'; did you mean '-Wno-implicit-float-conversion'? [-Wunknown-warning-option]
This makes it possible to use chromium headless with WebGL
(e.g. for webdriver tests) without having to rebuild from source.
The upstram default is to enable, thus simply removing our disabling switch.
Also fixes#41918.
This reverts commit 02ca096a85eced0d653004ae95f7cc6d8597b13e.
The clang-format binary is now included in the release tarball [0] and
we don't need to add it anymore. This fixes the following build error:
ln: failed to create symbolic link 'buildtools/linux64/clang-format': File exists
However, the build still fails a bit later in the configure phase.
[0]: https://bugs.chromium.org/p/chromium/issues/detail?id=1052503
The webrtc code suffered from a race condition when used
with Pulseaudio. This lead to audio input breaking every
couple of minutes during a webrtc session.
The fix from 1d961a4c6d6 was unfortunately incomplete. This commit fixes
the second error [0] that occurs later during the build (the Python
script third_party/blink/renderer/bindings/scripts/generate_bindings.py
requires buildtools/linux64/clang-format).
[0]: https://github.com/NixOS/nixpkgs/pull/81016#issuecomment-591572821
The skia patch no longer applies, and is no longer necessary.
The current version of chromium doesn't build with gcc. This has been
fixed upstream[1] and could be backported, but switching aarch64 to
clang/llvm and making the build the same on all platforms is simpler.
[1] 9662ec8440
This partially reverts commit
f45798e544c6fc7dc9fe5494330d98406687fa85.
cc @ivan I'd like to have that left in, because it's very useful for
gcc compiles, when necessary patches often span multiple releases,
i.e. for aarch64 builds
CVE-2019-13693 CVE-2019-13694 CVE-2019-13695 CVE-2019-13696
CVE-2019-13697
Disable jumbo mode because upstream dropped support for it.
(See chromium-dev "We're removing support for the jumbo build")
This makes builds take about 3x as long, but we have no alternative.