diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-03-18 23:03:48 -0700 |
---|---|---|
committer | jade <lix@jade.fyi> | 2024-03-27 03:52:57 +0000 |
commit | 412a9c9f6719a6c62e8f5b6265714428d2ad4013 (patch) | |
tree | 411ebdeaa53cbf0129f7cfcdf2ebecdd6141178f /misc | |
parent | 50c6feeb7747f8fd36aad801b7225552b0481dab (diff) |
Enable clang build timing analysis
I didn't enable this by default for clang due to making the build time
10% worse or so. Unfortunate, but tbh devs for whom 10% of build time is
not *that* bad should probably simply enable this.
Change-Id: I8d1e5b6f3f76c649a4e2f115f534f7f97cee46e6
Diffstat (limited to 'misc')
-rw-r--r-- | misc/clangbuildanalyzer.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/misc/clangbuildanalyzer.nix b/misc/clangbuildanalyzer.nix new file mode 100644 index 000000000..a317e5144 --- /dev/null +++ b/misc/clangbuildanalyzer.nix @@ -0,0 +1,27 @@ +# Upstreaming here, can be deleted once it's upstreamed: +# https://github.com/NixOS/nixpkgs/pull/297102 +{ stdenv, lib, cmake, fetchFromGitHub }: +stdenv.mkDerivation (finalAttrs: { + pname = "clangbuildanalyzer"; + version = "1.5.0"; + + src = fetchFromGitHub { + owner = "aras-p"; + repo = "ClangBuildAnalyzer"; + rev = "v${finalAttrs.version}"; + sha256 = "sha256-kmgdk634zM0W0OoRoP/RzepArSipa5bNqdVgdZO9gxo="; + }; + + nativeBuildInputs = [ + cmake + ]; + + meta = { + description = "Tool for analyzing Clang's -ftrace-time files"; + homepage = "https://github.com/aras-p/ClangBuildAnalyzer"; + maintainers = with lib.maintainers; [ lf- ]; + license = lib.licenses.unlicense; + platforms = lib.platforms.unix; + mainProgram = "ClangBuildAnalyzer"; + }; +}) |