clang-analyzer: Fix the build with LLVM 13

We changed the source structure ("src") by switching from individual
source tarballs to the mono repository. Therefore we have to prepend
"clang/" now.
This commit is contained in:
Michael Weiss 2021-11-01 21:15:03 +01:00
parent 4a7fca2240
commit 4471cbc26d
No known key found for this signature in database
GPG key ID: 5BE487C4D4771D83
2 changed files with 18 additions and 14 deletions

View file

@ -1,21 +1,22 @@
From 40239d92957f1969652cdd41d6d2749c41ac4338 Mon Sep 17 00:00:00 2001
From 99a7e55a60c8d96e160f9104a3dd31b7914d3488 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Fri, 31 Jul 2020 09:22:03 +0100
Subject: [PATCH] [PATCH] Fix scan-build to use NIX_CFLAGS_COMPILE
Subject: [PATCH] Fix scan-build to use NIX_CFLAGS_COMPILE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
tools/scan-build/libexec/ccc-analyzer | 8 ++++++++
clang/tools/scan-build/libexec/ccc-analyzer | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/scan-build/libexec/ccc-analyzer b/tools/scan-build/libexec/ccc-analyzer
index 800f38b5..0fb50fb3 100755
--- a/tools/scan-build/libexec/ccc-analyzer
+++ b/tools/scan-build/libexec/ccc-analyzer
@@ -246,6 +246,14 @@ sub Analyze {
diff --git a/clang/tools/scan-build/libexec/ccc-analyzer
b/clang/tools/scan-build/libexec/ccc-analyzer
index ed0d4d3d73f3..2d5113435ca5 100755
--- a/clang/tools/scan-build/libexec/ccc-analyzer
+++ b/clang/tools/scan-build/libexec/ccc-analyzer
@@ -249,6 +249,14 @@ sub Analyze {
push @Args, "-target", $AnalyzerTarget;
}
@ -31,5 +32,4 @@ index 800f38b5..0fb50fb3 100755
@CmdArgs = @$AnalysisArgs;
}
--
2.27.0
2.33.0

View file

@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/share/scan-view $out/bin
cp -R tools/scan-view/share/* $out/share/scan-view
cp -R tools/scan-view/bin/* $out/bin/scan-view
cp -R tools/scan-build/* $out
cp -R clang/tools/scan-view/share/* $out/share/scan-view
cp -R clang/tools/scan-view/bin/* $out/bin/scan-view
cp -R clang/tools/scan-build/* $out
rm $out/bin/*.bat $out/libexec/*.bat $out/CMakeLists.txt
@ -26,7 +26,11 @@ stdenv.mkDerivation rec {
meta = {
description = "Clang Static Analyzer";
homepage = "http://clang-analyzer.llvm.org";
longDescription = ''
The Clang Static Analyzer is a source code analysis tool that finds bugs
in C, C++, and Objective-C programs.
'';
homepage = "https://clang-analyzer.llvm.org/";
license = lib.licenses.bsd3;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.thoughtpolice ];