Commit 51ba14b
committed
llvmPackages: Make targetLlvmLibraries overridable
Pull #320261 introduced the possibility to consistently override
dependencies within an llvm package set. This is useful for development
and testing exotic configurations.
Go one step further and enable overriding targetLlvmLibraries.
This makes it possible to write an overlay such as:
```nix
overlays = [
(self: super: {
llvmPackages = super.llvmPackages.override (prev: {
targetLlvmLibraries = super.targetPackages.llvmPackages.libraries // {
compiler-rt = super.targetPackages.llvmPackages.libraries.compiler-rt.override {
...
}
};
});
})
];
```
... where the overridden compiler-rt will be used in a pkgsLLVM build.
As a straw man, I've done the minimally invasive thing to the code
structure: `targetLlvmLibraries` is not an explicitly named parameter
for llvmPackages; but it is available in `packageSetArgs` if passed.
This makes it slightly less discoverable, but this seems like a
reasonable tradeoff considered that modifying this would be a fairly
advanced/esoteric thing to need to do.
In some ways it would be better to have as an explicit parameter with a
default, but the obvious thing won't work because the default needs to
be a non-trivial expression. Potentially we could instead have it as a
defaulted parameter with the value of 'null', and if it's null, then
compute the current thing.
Signed-off-by: Peter Waller <[email protected]>1 parent 6011527 commit 51ba14b
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
0 commit comments