import clang-15.0.7-1.module+el8.8.0+17939+b58878af

This commit is contained in:
CentOS Sources 2023-05-16 06:06:09 +00:00 committed by Stepan Oksanichenko
parent be957384a2
commit 5cab2f5c20
12 changed files with 144 additions and 267 deletions

View File

@ -1,3 +1,3 @@
88442d295bc0b96df7cf3d526ed9eabd7a214ac2 SOURCES/clang-14.0.6.src.tar.xz
dac5046f0eb81e6c47432cf80229599befbf273e SOURCES/clang-tools-extra-14.0.6.src.tar.xz
b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc
7b4d1188cce1ce4ea1cf2ea362fba685c4aca34d SOURCES/clang-15.0.7.src.tar.xz
752fe847136eff2dfbfcc8bbddfaa9319532d104 SOURCES/clang-tools-extra-15.0.7.src.tar.xz
347bdd5ee6d6b93c9644c268511815912c0fb2dc SOURCES/release-keys.asc

6
.gitignore vendored
View File

@ -1,3 +1,3 @@
SOURCES/clang-14.0.6.src.tar.xz
SOURCES/clang-tools-extra-14.0.6.src.tar.xz
SOURCES/tstellar-gpg-key.asc
SOURCES/clang-15.0.7.src.tar.xz
SOURCES/clang-tools-extra-15.0.7.src.tar.xz
SOURCES/release-keys.asc

View File

@ -0,0 +1,82 @@
From 581300e447602b9b7a505b0f07e8461d58d041ca Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 1 Jul 2022 21:24:17 -0700
Subject: [PATCH] clang-tools-extra: Make test dependency on LLVMHello optional
This fixes clang + clang-tools-extra standalone build after
36892727e4f19a60778e371d78f8fb09d8122c85.
---
clang-tools-extra/test/CMakeLists.txt | 10 +++++++++-
clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp | 2 +-
clang-tools-extra/test/lit.cfg.py | 3 +++
clang-tools-extra/test/lit.site.cfg.py.in | 1 +
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt
index f4c529ee8af2..1cfb4dd529aa 100644
--- a/clang-tools-extra/test/CMakeLists.txt
+++ b/clang-tools-extra/test/CMakeLists.txt
@@ -7,10 +7,15 @@
set(CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
set(CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..")
+if (TARGET LLVMHello)
+ set (LLVM_HAS_LLVM_HELLO 1)
+endif()
+
llvm_canonicalize_cmake_booleans(
CLANG_TIDY_ENABLE_STATIC_ANALYZER
CLANG_PLUGIN_SUPPORT
LLVM_INSTALL_TOOLCHAIN_ONLY
+ LLVM_HAS_LLVM_HELLO
)
configure_lit_site_cfg(
@@ -86,7 +91,10 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
endif()
if(TARGET CTTestTidyModule)
- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello)
+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule)
+ if (TARGET LLVMHello)
+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule)
+ endif()
target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}")
if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
set(LLVM_LINK_COMPONENTS
diff --git a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
index c66a94f458cf..b4e7a5d691e5 100644
--- a/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
+++ b/clang-tools-extra/test/clang-tidy/CTTestTidyModule.cpp
@@ -1,4 +1,4 @@
-// REQUIRES: plugins
+// REQUIRES: plugins, llvm-hello
// RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s
// CHECK-LIST: Enabled checks:
// CHECK-LIST-NEXT: mytest1
diff --git a/clang-tools-extra/test/lit.cfg.py b/clang-tools-extra/test/lit.cfg.py
index 9b99bfd93440..3fca9f25fb48 100644
--- a/clang-tools-extra/test/lit.cfg.py
+++ b/clang-tools-extra/test/lit.cfg.py
@@ -59,3 +59,6 @@ config.substitutions.append(
# Plugins (loadable modules)
if config.has_plugins and config.llvm_plugin_ext:
config.available_features.add('plugins')
+
+if config.has_llvm_hello:
+ config.available_features.add("llvm-hello")
diff --git a/clang-tools-extra/test/lit.site.cfg.py.in b/clang-tools-extra/test/lit.site.cfg.py.in
index 4eb830a1baf1..6e5559348454 100644
--- a/clang-tools-extra/test/lit.site.cfg.py.in
+++ b/clang-tools-extra/test/lit.site.cfg.py.in
@@ -11,6 +11,7 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@
config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@
+config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.
config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
--
2.27.0

View File

@ -1,7 +1,7 @@
From 6509777d4c12a42c7487814d868375a86712bf5b Mon Sep 17 00:00:00 2001
From 1f68d73910ddee1beaf3582480b8a9738c941a43 Mon Sep 17 00:00:00 2001
From: Konrad Kleine <kkleine@redhat.com>
Date: Thu, 24 Mar 2022 09:44:21 +0100
Subject: [PATCH][clang]Produce DWARF4 by default
Subject: [PATCH] Produce DWARF4 by default
Have a look at the following commit to see when the move from DWARF 4 to 5 first happened upstream:
@ -10,15 +10,16 @@ https://github.com/llvm/llvm-project/commit/d3b26dea16108c427b19b5480c9edc76edf8
clang/include/clang/Driver/ToolChain.h | 2 +-
clang/test/CodeGen/dwarf-version.c | 4 ++--
clang/test/Driver/cl-options.c | 2 +-
clang/test/Driver/clang-g-opts.c | 2 +-
clang/test/Driver/ve-toolchain.c | 2 +-
clang/test/Driver/ve-toolchain.cpp | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/clang/include/clang/Driver/ToolChain.h b/clang/include/clang/Driver/ToolChain.h
index adf1753e8d3a..c8adc4d917ce 100644
index f20ab164531b..53c86ee82936 100644
--- a/clang/include/clang/Driver/ToolChain.h
+++ b/clang/include/clang/Driver/ToolChain.h
@@ -515,7 +515,7 @@ public:
@@ -535,7 +535,7 @@ public:
// Return the DWARF version to emit, in the absence of arguments
// to the contrary.
@ -43,10 +44,10 @@ index 0a6fa4768026..96f01749d0d8 100644
// The -isysroot is used as a hack to avoid LIT messing with the SDKROOT
// environment variable which indirecty overrides the version in the target
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index f332cd83b26e..911779fffbef 100644
index a2e350a0a835..01889ba0bf9b 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -597,7 +597,7 @@
@@ -570,7 +570,7 @@
// RUN: %clang_cl /Z7 -gdwarf /c -### -- %s 2>&1 | FileCheck -check-prefix=Z7_gdwarf %s
// Z7_gdwarf: "-gcodeview"
// Z7_gdwarf: "-debug-info-kind=constructor"
@ -55,35 +56,10 @@ index f332cd83b26e..911779fffbef 100644
// RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s
// CXX11: -std=c++11
diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c
index 753dee19fcbf..dfd12cc0bba4 100644
--- a/clang/test/Driver/ve-toolchain.c
+++ b/clang/test/Driver/ve-toolchain.c
@@ -6,7 +6,7 @@
/// Checking dwarf-version
// RUN: %clang -### -g -target ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
-// DWARF_VER: "-dwarf-version=5"
+// DWARF_VER: "-dwarf-version=4"
///-----------------------------------------------------------------------------
/// Checking include-path
diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp
index 4b2b9c5747fe..3a196dd94ca1 100644
--- a/clang/test/Driver/ve-toolchain.cpp
+++ b/clang/test/Driver/ve-toolchain.cpp
@@ -7,7 +7,7 @@
// RUN: %clangxx -### -g -target ve-unknown-linux-gnu \
// RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
-// DWARF_VER: "-dwarf-version=5"
+// DWARF_VER: "-dwarf-version=4"
///-----------------------------------------------------------------------------
/// Checking include-path
diff -ruN clang-14.0.0.src.orig/test/Driver/clang-g-opts.c clang-14.0.0.src/test/Driver/clang-g-opts.c
--- a/clang-14.0.0.src.orig/test/Driver/clang-g-opts.c 2022-03-14 10:44:55.000000000 +0100
+++ b/clang-14.0.0.src/test/Driver/clang-g-opts.c 2022-04-13 06:36:55.832253890 +0200
diff --git a/clang/test/Driver/clang-g-opts.c b/clang/test/Driver/clang-g-opts.c
index d982b1070cae..bb129e75769c 100644
--- a/clang/test/Driver/clang-g-opts.c
+++ b/clang/test/Driver/clang-g-opts.c
@@ -32,7 +32,7 @@
// CHECK-WITHOUT-G-NOT: -debug-info-kind
@ -93,6 +69,32 @@ diff -ruN clang-14.0.0.src.orig/test/Driver/clang-g-opts.c clang-14.0.0.src/test
// CHECK-WITH-G-DWARF2: "-dwarf-version=2"
// CHECK-WITH-G-STANDALONE: "-debug-info-kind=standalone"
--
2.35.1
diff --git a/clang/test/Driver/ve-toolchain.c b/clang/test/Driver/ve-toolchain.c
index 32e25769b6da..b8a2852daba8 100644
--- a/clang/test/Driver/ve-toolchain.c
+++ b/clang/test/Driver/ve-toolchain.c
@@ -6,7 +6,7 @@
/// Checking dwarf-version
// RUN: %clang -### -g --target=ve %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
-// DWARF_VER: "-dwarf-version=5"
+// DWARF_VER: "-dwarf-version=4"
///-----------------------------------------------------------------------------
/// Checking include-path
diff --git a/clang/test/Driver/ve-toolchain.cpp b/clang/test/Driver/ve-toolchain.cpp
index 5a33d5eceb61..cedf895b36dc 100644
--- a/clang/test/Driver/ve-toolchain.cpp
+++ b/clang/test/Driver/ve-toolchain.cpp
@@ -7,7 +7,7 @@
// RUN: %clangxx -### -g --target=ve-unknown-linux-gnu \
// RUN: %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
-// DWARF_VER: "-dwarf-version=5"
+// DWARF_VER: "-dwarf-version=4"
///-----------------------------------------------------------------------------
/// Checking include-path
--
2.37.1

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,128 +0,0 @@
diff --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
index 0c9455f..22638ee 100644
--- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
@@ -451,123 +451,6 @@ TEST_F(TUSchedulerTests, InvalidationUnchanged) {
EXPECT_EQ(1, Actions.load()) << "All actions should run";
}
-TEST_F(TUSchedulerTests, ManyUpdates) {
- const int FilesCount = 3;
- const int UpdatesPerFile = 10;
-
- std::mutex Mut;
- int TotalASTReads = 0;
- int TotalPreambleReads = 0;
- int TotalUpdates = 0;
- llvm::StringMap<int> LatestDiagVersion;
-
- // Run TUScheduler and collect some stats.
- {
- auto Opts = optsForTest();
- Opts.UpdateDebounce = DebouncePolicy::fixed(std::chrono::milliseconds(50));
- TUScheduler S(CDB, Opts, captureDiags());
-
- std::vector<std::string> Files;
- for (int I = 0; I < FilesCount; ++I) {
- std::string Name = "foo" + std::to_string(I) + ".cpp";
- Files.push_back(testPath(Name));
- this->FS.Files[Files.back()] = "";
- }
-
- StringRef Contents1 = R"cpp(int a;)cpp";
- StringRef Contents2 = R"cpp(int main() { return 1; })cpp";
- StringRef Contents3 = R"cpp(int a; int b; int sum() { return a + b; })cpp";
-
- StringRef AllContents[] = {Contents1, Contents2, Contents3};
- const int AllContentsSize = 3;
-
- // Scheduler may run tasks asynchronously, but should propagate the
- // context. We stash a nonce in the context, and verify it in the task.
- static Key<int> NonceKey;
- int Nonce = 0;
-
- for (int FileI = 0; FileI < FilesCount; ++FileI) {
- for (int UpdateI = 0; UpdateI < UpdatesPerFile; ++UpdateI) {
- auto Contents = AllContents[(FileI + UpdateI) % AllContentsSize];
-
- auto File = Files[FileI];
- auto Inputs = getInputs(File, Contents.str());
- {
- WithContextValue WithNonce(NonceKey, ++Nonce);
- Inputs.Version = std::to_string(UpdateI);
- updateWithDiags(
- S, File, Inputs, WantDiagnostics::Auto,
- [File, Nonce, Version(Inputs.Version), &Mut, &TotalUpdates,
- &LatestDiagVersion](std::vector<Diag>) {
- EXPECT_THAT(Context::current().get(NonceKey), Pointee(Nonce));
- EXPECT_EQ(File, boundPath());
-
- std::lock_guard<std::mutex> Lock(Mut);
- ++TotalUpdates;
- EXPECT_EQ(File, *TUScheduler::getFileBeingProcessedInContext());
- // Make sure Diags are for a newer version.
- auto It = LatestDiagVersion.try_emplace(File, -1);
- const int PrevVersion = It.first->second;
- int CurVersion;
- ASSERT_TRUE(llvm::to_integer(Version, CurVersion, 10));
- EXPECT_LT(PrevVersion, CurVersion);
- It.first->getValue() = CurVersion;
- });
- }
- {
- WithContextValue WithNonce(NonceKey, ++Nonce);
- S.runWithAST(
- "CheckAST", File,
- [File, Inputs, Nonce, &Mut,
- &TotalASTReads](Expected<InputsAndAST> AST) {
- EXPECT_THAT(Context::current().get(NonceKey), Pointee(Nonce));
- EXPECT_EQ(File, boundPath());
-
- ASSERT_TRUE((bool)AST);
- EXPECT_EQ(AST->Inputs.Contents, Inputs.Contents);
- EXPECT_EQ(AST->Inputs.Version, Inputs.Version);
- EXPECT_EQ(AST->AST.version(), Inputs.Version);
-
- std::lock_guard<std::mutex> Lock(Mut);
- ++TotalASTReads;
- EXPECT_EQ(File, *TUScheduler::getFileBeingProcessedInContext());
- });
- }
-
- {
- WithContextValue WithNonce(NonceKey, ++Nonce);
- S.runWithPreamble(
- "CheckPreamble", File, TUScheduler::Stale,
- [File, Inputs, Nonce, &Mut,
- &TotalPreambleReads](Expected<InputsAndPreamble> Preamble) {
- EXPECT_THAT(Context::current().get(NonceKey), Pointee(Nonce));
- EXPECT_EQ(File, boundPath());
-
- ASSERT_TRUE((bool)Preamble);
- EXPECT_EQ(Preamble->Contents, Inputs.Contents);
-
- std::lock_guard<std::mutex> Lock(Mut);
- ++TotalPreambleReads;
- EXPECT_EQ(File, *TUScheduler::getFileBeingProcessedInContext());
- });
- }
- }
- }
- ASSERT_TRUE(S.blockUntilIdle(timeoutSeconds(10)));
- } // TUScheduler destructor waits for all operations to finish.
-
- std::lock_guard<std::mutex> Lock(Mut);
- // Updates might get coalesced in preamble thread and result in dropping
- // diagnostics for intermediate snapshots.
- EXPECT_GE(TotalUpdates, FilesCount);
- EXPECT_LE(TotalUpdates, FilesCount * UpdatesPerFile);
- // We should receive diags for last update.
- for (const auto &Entry : LatestDiagVersion)
- EXPECT_EQ(Entry.second, UpdatesPerFile - 1);
- EXPECT_EQ(TotalASTReads, FilesCount * UpdatesPerFile);
- EXPECT_EQ(TotalPreambleReads, FilesCount * UpdatesPerFile);
-}
-
TEST_F(TUSchedulerTests, EvictedAST) {
std::atomic<int> BuiltASTCounter(0);
auto Opts = optsForTest();

View File

@ -1,61 +0,0 @@
diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/clang-tidy/CTTestTidyModule.cpp a/clang-tools-extra-14.0.0rc2.src/test/clang-tidy/CTTestTidyModule.cpp
--- a/clang-tools-extra-14.0.0rc2.src.orig/test/clang-tidy/CTTestTidyModule.cpp 2022-03-02 01:46:37.000000000 +0100
+++ a/clang-tools-extra-14.0.0rc2.src/test/clang-tidy/CTTestTidyModule.cpp 2022-03-07 08:52:20.009112976 +0100
@@ -1,4 +1,4 @@
-// REQUIRES: plugins
+// REQUIRES: plugins, llvm-hello
// RUN: clang-tidy -checks='-*,mytest*' --list-checks -load %llvmshlibdir/CTTestTidyModule%pluginext -load %llvmshlibdir/LLVMHello%pluginext | FileCheck --check-prefix=CHECK-LIST %s
// CHECK-LIST: Enabled checks:
// CHECK-LIST-NEXT: mytest1
diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/CMakeLists.txt a/clang-tools-extra-14.0.0rc2.src/test/CMakeLists.txt
--- a/clang-tools-extra-14.0.0rc2.src.orig/test/CMakeLists.txt 2022-03-02 01:46:37.000000000 +0100
+++ a/clang-tools-extra-14.0.0rc2.src/test/CMakeLists.txt 2022-03-07 10:58:56.172490672 +0100
@@ -15,10 +15,15 @@
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
+if (TARGET LLVMHello)
+ set (LLVM_HAS_LLVM_HELLO 1)
+endif()
+
llvm_canonicalize_cmake_booleans(
CLANG_TIDY_ENABLE_STATIC_ANALYZER
CLANG_PLUGIN_SUPPORT
LLVM_INSTALL_TOOLCHAIN_ONLY
+ LLVM_HAS_LLVM_HELLO
)
configure_lit_site_cfg(
@@ -97,7 +102,10 @@
endif()
if(TARGET CTTestTidyModule)
- list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule LLVMHello)
+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule)
+ if (TARGET LLVMHello)
+ list(APPEND CLANG_TOOLS_TEST_DEPS CTTestTidyModule) # Should be LLVMHello?
+ endif()
target_include_directories(CTTestTidyModule PUBLIC BEFORE "${CLANG_TOOLS_SOURCE_DIR}")
if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
set(LLVM_LINK_COMPONENTS
diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.cfg.py a/clang-tools-extra-14.0.0rc2.src/test/lit.cfg.py
--- a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.cfg.py 2022-03-02 01:46:37.000000000 +0100
+++ a/clang-tools-extra-14.0.0rc2.src/test/lit.cfg.py 2022-03-07 08:52:20.010112983 +0100
@@ -155,3 +155,6 @@
# Plugins (loadable modules)
if config.has_plugins and config.llvm_plugin_ext:
config.available_features.add('plugins')
+
+if config.has_llvm_hello:
+ config.available_features.add('llvm-hello')
diff -ruN a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.site.cfg.py.in a/clang-tools-extra-14.0.0rc2.src/test/lit.site.cfg.py.in
--- a/clang-tools-extra-14.0.0rc2.src.orig/test/lit.site.cfg.py.in 2022-03-02 01:46:37.000000000 +0100
+++ a/clang-tools-extra-14.0.0rc2.src/test/lit.site.cfg.py.in 2022-03-07 10:59:17.202663983 +0100
@@ -13,6 +13,7 @@
config.target_triple = "@TARGET_TRIPLE@"
config.clang_tidy_staticanalyzer = @CLANG_TIDY_ENABLE_STATIC_ANALYZER@
config.has_plugins = @CLANG_PLUGIN_SUPPORT@ & ~@LLVM_INSTALL_TOOLCHAIN_ONLY@
+config.has_llvm_hello = @LLVM_HAS_LLVM_HELLO@
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.

View File

@ -1,20 +0,0 @@
diff --git a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
index 253f78eb36ea..1199da3e4cfd 100644
--- a/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
+++ b/clang-tools-extra/unittests/clang-tidy/CMakeLists.txt
@@ -30,7 +30,6 @@ add_extra_unittest(ClangTidyTests
OptionsProviderTest.cpp
OverlappingReplacementsTest.cpp
UsingInserterTest.cpp
- ReadabilityModuleTest.cpp
TransformerClangTidyCheckTest.cpp
)
@@ -54,7 +53,6 @@ target_link_libraries(ClangTidyTests
clangTidyGoogleModule
clangTidyLLVMModule
clangTidyObjCModule
- clangTidyReadabilityModule
clangTidyUtils
LLVMTestingSupport
)

View File

@ -1,9 +1,9 @@
%bcond_with compat_build
%bcond_without check
%global maj_ver 14
%global maj_ver 15
%global min_ver 0
%global patch_ver 6
%global patch_ver 7
#global rc_ver 4
%global clang_version %{maj_ver}.%{min_ver}.%{patch_ver}
@ -52,7 +52,7 @@ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig
%endif
Source4: tstellar-gpg-key.asc
Source4: release-keys.asc
%if !0%{?compat_build}
Source5: macros.%{name}
%endif
@ -71,9 +71,7 @@ Patch8: disable-recommonmark.patch
# Patches for clang-tools-extra
%if %{without compat_build}
Patch201: clangd-tests.patch
Patch202: llvm-hello.patch
Patch203: remove-test.patch
Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch
%endif
BuildRequires: gcc
@ -256,14 +254,8 @@ Requires: python3
%setup -T -q -b 1 -n %{clang_tools_srcdir}
%autopatch -m200 -p2
# This test is broken upstream. It is a clang-tidy unittest
# that includes a file from clang, breaking standalone builds.
# https://github.com/llvm/llvm-project/issues/54116
rm unittests/clang-tidy/ReadabilityModuleTest.cpp
# failing test case
rm test/clang-tidy/checkers/altera-struct-pack-align.cpp
rm test/clang-tidy/checkers/altera/struct-pack-align.cpp
%py3_shebang_fix \
clang-tidy/tool/run-clang-tidy.py \
@ -327,7 +319,9 @@ CFLAGS="$CFLAGS -Wno-address -Wno-nonnull -Wno-maybe-uninitialized"
# -DLLVM_ENABLE_NEW_PASS_MANAGER=ON can be removed once this patch is committed:
# https://reviews.llvm.org/D107628
# We set CLANG_DEFAULT_PIE_ON_LINUX=OFF to match the default used by Fedora's GCC.
%cmake .. -G Ninja \
-DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
@ -484,7 +478,7 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format
%if %{with check}
# requires lit.py from LLVM utilities
# FIXME: Fix failing ARM tests
LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{_vpath_builddir} || \
LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} %{_smp_mflags} check-all -C %{_vpath_builddir} || \
%ifarch %{arm}
:
%else
@ -572,9 +566,11 @@ false
%{_bindir}/clang-include-fixer
%{_bindir}/clang-move
%{_bindir}/clang-offload-bundler
%{_bindir}/clang-offload-packager
%{_bindir}/clang-offload-wrapper
%{_bindir}/clang-linker-wrapper
%{_bindir}/clang-nvlink-wrapper
%{_bindir}/clang-pseudo
%{_bindir}/clang-query
%{_bindir}/clang-refactor
%{_bindir}/clang-rename
@ -611,6 +607,12 @@ false
%endif
%changelog
* Thu Jan 19 2023 Tom Stellard <tstellar@redhat.com> - 15.0.7-1
- Update to LLVM 15.0.7
* Tue Sep 06 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-1
- Update to LLVM 15.0.0
* Tue Jun 28 2022 Tom Stellard <tstellar@redhat.com> - 14.0.6-1
- 14.0.6 Release