From 68a1f6f391a2b67e0b93cdb7f70c29bded15dd84 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 28 Mar 2021 12:57:08 +0200 Subject: [PATCH] foot: fix PGO build with clang The way we need to do PGO builds for foot changed. The gcc build was unaffected by this, but has been updated to the new instructions. For clang using the outdated introduction meant that the PGO build was broken when using clang for building foot with PGO enabled. This has been fixed by updating to the new build instructions for both gcc and clang when using PGO: https://codeberg.org/dnkl/foot/pulls/420 foot.override { stdenv = llvmPackages_11.stdenv; } now works as expected. --- pkgs/applications/terminal-emulators/foot/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/terminal-emulators/foot/default.nix b/pkgs/applications/terminal-emulators/foot/default.nix index 2631bae57e5..d559daa2bf5 100644 --- a/pkgs/applications/terminal-emulators/foot/default.nix +++ b/pkgs/applications/terminal-emulators/foot/default.nix @@ -67,8 +67,8 @@ let # https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#performance-optimized-pgo pgoCflags = { - "clang" = "-O3 -Wno-ignored-optimization-argument -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled"; - "gcc" = "-O3 -Wno-missing-profile"; + "clang" = "-O3 -Wno-ignored-optimization-argument"; + "gcc" = "-O3"; }."${compilerName}"; # ar with lto support @@ -130,6 +130,10 @@ stdenv.mkDerivation rec { preBuild = lib.optionalString doPgo '' meson configure -Db_pgo=generate ninja + # make sure there is _some_ profiling data on all binaries + ./footclient --version + ./foot --version + # generate pgo data of wayland independent code ./pgo ${stimuliFile} ${stimuliFile} ${stimuliFile} meson configure -Db_pgo=use '' + lib.optionalString (doPgo && stdenv.cc.cc.pname == "clang") ''