grafana-alloy: Add option to use LLD for linking

Use LLD by default on armv7. The BFD linker has issues linking this
package on that platform.
This commit is contained in:
Philippe Hürlimann
2025-12-05 02:33:09 +01:00
parent 9cfae7bb77
commit 508b781f60
+6 -1
View File
@@ -13,6 +13,8 @@
nix-update-script,
installShellFiles,
testers,
lld,
useLLD ? stdenv.hostPlatform.isArmv7,
}:
buildGoModule (finalAttrs: {
@@ -34,7 +36,10 @@ buildGoModule (finalAttrs: {
yarn
nodejs
installShellFiles
];
]
++ lib.optionals useLLD [ lld ];
env = lib.optionalAttrs useLLD { NIX_CFLAGS_LINK = "-fuse-ld=lld"; };
ldflags =
let