Skip to content

llvm_11: build from git #114828

@vobloeb

Description

@vobloeb

llvm is currenly built from individual tarballs instead of upstream monorepo

The flaws of this approach are:

  1. there are boilerplate to reconstruct fragments of git monorepo in every subproject's .nix file. For example
    unpackPhase = ''
    unpackFile $src
    mv clang-* clang
    sourceRoot=$PWD/clang
    unpackFile ${clang-tools-extra_src}
    mv clang-tools-extra-* $sourceRoot/tools/extra
    '';
  2. there are difficulties with cherry-picking upstream patches because directory structure is altered, so nixpkgs has to host .patch-files instead of using fetchpatch from upstream git repo: https://github.com/NixOS/nixpkgs/tree/9ddb9c0021ede97e981c3dee2250bbd1abc50c6f/pkgs/development/compilers/llvm/11
  3. it is not possible to use bleeding edge features which are already on git's master but not yet in the latest tarballed release. chromiumDev often needs them. With git repo, llvm_11.override{src = ...} would work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: packaging requestRequest for a new package to be added6.topic: llvm/clangIssues related to llvmPackages, clangStdenv and related
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions