Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chromium: speed up build and enable system ffmpeg, libjpeg, and zlib #100110

Merged
merged 2 commits into from Oct 13, 2020

Conversation

@TredwellGit
Copy link
Member

@TredwellGit TredwellGit commented Oct 9, 2020

Only tested and built chromium not chromiumBeta and chromiumDev.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.
TredwellGit added 2 commits Oct 9, 2020
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.
@TredwellGit
Copy link
Member Author

@TredwellGit TredwellGit commented Oct 9, 2020

My plan in coming pull requests is to get Chromium to:

@TredwellGit
Copy link
Member Author

@TredwellGit TredwellGit commented Oct 9, 2020

Getting #99647 merged would help with my first goal.

@TredwellGit
Copy link
Member Author

@TredwellGit TredwellGit commented Oct 10, 2020

@primeos requesting review since ofborg did not.

@primeos
Copy link
Member

@primeos primeos commented Oct 13, 2020

Sorry for the delay, I lost track of this. Let's give this a try :)

  • a7cbf67
    • That's nice, thanks :) I guess this means that Chromium won't print a stack trace anymore when it crashes, but I don't think we needed those so far.
    • One request for the next time: Could you try wrapping the body of your commit messages at 72 characters? See https://chris.beams.io/posts/git-commit/#seven-rules. The commit message is nice though :)
  • eb74717
    • Reusing system libraries is obviously nice but I'm not sure yet if we can keep that commit. If this starts causing compatibility issues we might have to revert it in the future. It might also be problematic when testing the builds of the beta and dev channels.

@primeos primeos merged commit 89003c6 into NixOS:master Oct 13, 2020
17 checks passed
17 checks passed
@ofborg[bot]
chromium, chromium.passthru.tests on aarch64-linux Timed out, unknown build status
Details
@ofborg[bot]
chromium, chromium.passthru.tests on x86_64-linux Timed out, unknown build status
Details
@ofborg[bot]
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions[bot]
Wait for ofborg
Details
@ofborg[bot]
grahamcofborg-eval ^.^!
Details
@ofborg[bot]
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg[bot]
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg[bot]
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="eb74717"; rev="eb74717477bd782d202495e05afcbeefc4c26bb3"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg[bot]
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="eb74717"; rev="eb74717477bd782d202495e05afcbeefc4c26bb3"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="eb74717"; rev="eb74717477bd782d202495e05afcbeefc4c26bb3"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="eb74717"; rev="eb74717477bd782d202495e05afcbeefc4c26bb3"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="eb74717"; rev="eb74717477bd782d202495e05afcbeefc4c26bb3"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="eb74717"; rev="eb74717477bd782d202495e05afcbeefc4c26bb3"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="eb74717"; rev="eb74717477bd782d202495e05afcbeefc4c26bb3"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg[bot]
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@TredwellGit TredwellGit deleted the chromium branch Oct 13, 2020
@TredwellGit
Copy link
Member Author

@TredwellGit TredwellGit commented Oct 13, 2020

@primeos
Is wrapping lines a rule for Nixpkgs? I dislike wrapping lines since every terminal, visual text editor, and web browser that I am aware of will automatically wrap the line at the end of the window. See: https://lkml.org/lkml/2020/5/29/1038

I was planning to submit another pull request that additionally makes Chromium build with the system fontconfig, freetype, harfbuzz, icu, libdrm, libevent, libvpx, libxml, openh264, and re2. I don't expect there to be any issue right now since nixos-unstable has the latest version of all of those but harfbuzz, libvpx, and libwebp for which I submitted pull requests and re2 which someone just needs to merge. Other distros are able to handle using the system libraries using the latest versions; my main concern is with backporting the libraries, but if that is not possible they can just be selectively commented out.

@primeos
Copy link
Member

@primeos primeos commented Oct 13, 2020

Is wrapping lines a rule for Nixpkgs?

No, not that I know of, but most/(almost all?) people usually do it anyway (for code and especially for commit messages). And if you look at the commit messages in Nixpkgs or the Linux kernel most people wrap their lines at 72 or 80 characters (with exceptions of course, e.g. for readability).

Other distros are able to handle using the system libraries using the latest versions;

Yeah, though I'd assume that they also have more or dedicated maintainers (see #78450).

my main concern is with backporting the libraries, but if that is not possible they can just be selectively commented out.

Oh, I forgot to consider our stable channel. I guess selectively commenting them out is either up to you or I have to do it more aggressively (but only in the case of compilation errors) to avoid long iteration cycles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants