add LLVM copy from nixpkgs #114

Merged
sb10q merged 1 commits from srenblad/zynq-rs:add_llvm_11 into master 2024-05-24 15:25:14 +08:00
Contributor

Adds a stripped down copy of LLVM 11 from nixpkgs-23.11. Only includes llvmPackages_11.clang-unwrapped and llvmPackages_11.llvm.

Motivation:

rustc and LLVM versions need to be compatible to avoid linker bug. Current rustc version in repository is not compatible with LLVM 12 or higher. Due to llvmPackages_11 being removed on nixpkgs-unstable, a stripped copy from the stable branch is added to this repository and called from the flake.nix. Additionally adds llvmPackages_11 to the output of this flake to be used by artiq-zynq.

Why not use <nixpkgs/...> builtin?

While it works, it requires --impure flag.

Can llvmPackages_11 be retrieved from mozilla-overlay?

As I understand it, the overlay uses the llvmPackages provided by nixpkgs-unstable and thus does not expose llvmPackages_11.

Why not add another nixos-23.11 channel to the inputs of this flake?

This works and is a simple fix, however it adds bloat to the dev environment.

Adds a stripped down copy of LLVM 11 from `nixpkgs-23.11`. Only includes `llvmPackages_11.clang-unwrapped` and `llvmPackages_11.llvm`. #### Motivation: `rustc` and LLVM versions need to be compatible to avoid linker bug. Current `rustc` version in repository is not compatible with LLVM 12 or higher. Due to `llvmPackages_11` being removed on `nixpkgs-unstable`, a stripped copy from the stable branch is added to this repository and called from the `flake.nix`. Additionally adds `llvmPackages_11` to the output of this flake to be used by `artiq-zynq`. #### Why not use <nixpkgs/...> builtin? While it works, it requires --impure flag. #### Can `llvmPackages_11` be retrieved from `mozilla-overlay`? As I understand it, the overlay uses the `llvmPackages` provided by `nixpkgs-unstable` and thus does not expose `llvmPackages_11`. #### Why not add another `nixos-23.11` channel to the inputs of this flake? This works and is a simple fix, however it adds bloat to the dev environment.
srenblad added 1 commit 2024-05-24 14:39:07 +08:00
srenblad changed title from WIP: add LLVM copy from nixpkgs to add LLVM copy from nixpkgs 2024-05-24 14:45:03 +08:00
sb10q merged commit 46dc25b89e into master 2024-05-24 15:25:14 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/zynq-rs#114
No description provided.