* [PATCH] tools: use llvmPackages as input
@ 2025-11-04 18:33 Alyssa Ross
2025-11-13 11:25 ` Alyssa Ross
0 siblings, 1 reply; 2+ messages in thread
From: Alyssa Ross @ 2025-11-04 18:33 UTC (permalink / raw)
To: devel; +Cc: Yureka Lilian
This makes sure that clang and clang-tidy will be using the same
version of LLVM. (It's looking like we might also need LLVM libunwind
at some point, so that's another thing we could take from a single
llvmPackages.)
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
tools/default.nix | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/default.nix b/tools/default.nix
index 398f570..06b7ed2 100644
--- a/tools/default.nix
+++ b/tools/default.nix
@@ -5,9 +5,9 @@
import ../lib/call-package.nix (
{ src, lib, stdenv, fetchCrate, fetchurl, runCommand, buildPackages
, meson, ninja, pkg-config, rustc
-, clang-tools, clippy, jq
+, llvmPackages, clippy, jq
, dbus, linuxHeaders
-, clang, libbpf
+, libbpf
, buildSupport ? false
, appSupport ? true
, hostSupport ? false
@@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ meson ninja ]
++ lib.optionals (appSupport || driverSupport) [ pkg-config ]
++ lib.optionals hostSupport [ rustc ]
- ++ lib.optionals driverSupport [ clang.cc ];
+ ++ lib.optionals driverSupport [ llvmPackages.clang-unwrapped ];
buildInputs = lib.optionals appSupport [ dbus ]
++ lib.optionals driverSupport [ libbpf linuxHeaders ];
@@ -121,7 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
# clang-tools needs to be before clang, otherwise it will not use
# the Nix include path correctly and fail to find headers
- nativeBuildInputs = [ clang-tools jq ] ++ nativeBuildInputs;
+ nativeBuildInputs = [ llvmPackages.clang-tools jq ] ++ nativeBuildInputs;
buildPhase = ''
jq -r '.[].file | select(endswith(".c"))' compile_commands.json |
base-commit: 1d666582892fbdf812662b4490caf7821078eaf9
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools: use llvmPackages as input
2025-11-04 18:33 [PATCH] tools: use llvmPackages as input Alyssa Ross
@ 2025-11-13 11:25 ` Alyssa Ross
0 siblings, 0 replies; 2+ messages in thread
From: Alyssa Ross @ 2025-11-13 11:25 UTC (permalink / raw)
To: Alyssa Ross, devel; +Cc: Yureka Lilian
This patch has been committed as 4b89596e112d26c4bd60bc46bb45c5d9a0875314,
which can be viewed online at
https://spectrum-os.org/git/spectrum/commit/?id=4b89596e112d26c4bd60bc46bb45c5d9a0875314.
This is an automated message. Send comments/questions/requests to:
Alyssa Ross <hi@alyssa.is>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-13 11:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 18:33 [PATCH] tools: use llvmPackages as input Alyssa Ross
2025-11-13 11:25 ` Alyssa Ross
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).